Sha256: e93ed2ca5932900de2f98b412d831c99d8de21692c2495d930f5e230007abe3d

Contents?: true

Size: 447 Bytes

Versions: 2

Compression:

Stored size: 447 Bytes

Contents

<%= lookbook_render :button,
  name: "copy-button",
  **@button_attrs,
  "x-data": prepare_alpine_data,
  "@click.prevent": "copyToClipboard" do |button| %>
  <% button.with_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

2 entries across 2 versions & 1 rubygems

Version Path
lookbook-1.5.5 app/components/lookbook/copy_button/component.html.erb
lookbook-1.5.4 app/components/lookbook/copy_button/component.html.erb