Sha256: 33f542c0f738b1c22215ca709e177876851ac6668b87cc5182099b15d5baecb9

Contents?: true

Size: 462 Bytes

Versions: 3

Compression:

Stored size: 462 Bytes

Contents

<%= render_component :button,
  name: "copy-button",
  **@button_attrs,
  x_data: prepare_alpine_data,
  "@click.prevent": "copyToClipboard" do |button| %>
  <% button.icon name: @icon, size: icon_size, x_show: "!copied", cloak: true %>
  <%= render_component :icon, name: :check, size: icon_size, class: "text-green-500", x_show: "copied", cloak: true  %>
  <% if content %>
    <div x-ref="copyTarget" class="hidden"><%== content %></div>
  <% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lookbook-1.0.0.beta.2 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.1 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.0 app/components/lookbook/copy_button/component.html.erb