mirror of
https://github.com/CoreyGinnivan/system-uicons.git
synced 2024-06-16 12:44:59 +02:00
Scope copied toast
This commit is contained in:
parent
0c3e8bf050
commit
cc5844fa95
|
@ -243,13 +243,13 @@
|
|||
`.svg`"
|
||||
x-bind:download="downloadType === 'download-svg' && item.icon_name"
|
||||
class="flex flex-col relative items-center group justify-center text-gray-700 rounded shadow hover:shadow-xl bg-white cursor-pointer transition duration-150 ease-in-out h-32 md:h-40"
|
||||
@click="handleClick(item, downloadType, $event), $dispatch('show:toast'), setTimeout(() => $dispatch('show:toast'), 1000)"
|
||||
@click="handleClick(item, downloadType, $event), $dispatch('show:toast', item.icon_name), setTimeout(() => $dispatch('show:toast', false), 1000)"
|
||||
>
|
||||
<div x-data="{ copied: false }">
|
||||
<div
|
||||
role="alert"
|
||||
x-show="copied"
|
||||
x-on:show:toast.document="copied = !copied"
|
||||
x-show="copied === item.icon_name"
|
||||
x-on:show:toast.document="copied = $event.detail"
|
||||
x-cloak
|
||||
class="rounded bg-black py-1 px-2 absolute top-0 -mt-8 left-0 right-0 text-sm text-white text-center mx-auto z-50"
|
||||
style="width: fit-content;"
|
||||
|
|
Loading…
Reference in a new issue