Sha256: 2220306cd09e506077836fd7a0233f741030940b22659b77fe4696587736f3c8

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 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

2 entries across 2 versions & 1 rubygems

Version Path
lookbook-1.0.0.beta.4 app/components/lookbook/copy_button/component.html.erb
lookbook-1.0.0.beta.3 app/components/lookbook/copy_button/component.html.erb