Sha256: c06eeab6159064bf37f03ce257a09e314ec3727c29fca10d1503d4ed333691df

Contents?: true

Size: 444 Bytes

Versions: 16

Compression:

Stored size: 444 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 %>
  <%= icon  :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

16 entries across 16 versions & 1 rubygems

Version Path
lookbook-1.0.8 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.7 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.6 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.5 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.4 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.3 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.2 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.1 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.rc.3 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.rc.2 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.rc.1 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.8 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.7 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.6 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.5 app/components/lookbook/copy_button/component.html.erb