add toggleable icons for the clipboard component

This commit is contained in:
Alex Turchyn
2023-06-11 18:42:00 +03:00
parent 2b5bdbe4dc
commit 546150e08c
5 changed files with 18 additions and 7 deletions
+3 -2
View File
@@ -9,8 +9,9 @@
Share link
</buttun>
<input id="share-link-input" autocomplete="off" type="text" class="input input-bordered w-full join-item" value="<%= start_form_url(slug: @template.slug) %>" disabled>
<clipboard-copy class="btn btn-neutral btn-square join-item text-white font-bold" for="share-link-input">
<%= svg_icon('clipboard', class: 'w-6 h-6') %>
<clipboard-copy class="btn btn-neutral btn-square join-item text-white font-bold swap swap-active" for="share-link-input">
<%= svg_icon('clipboard', class: 'w-6 h-6 swap-on text-white') %>
<%= svg_icon('clipboard_copy', class: 'w-6 h-6 swap-off text-white') %>
</clipboard-copy>
</div>
</div>