mirror of
https://github.com/CoreyGinnivan/system-uicons.git
synced 2024-05-02 21:53:11 +02:00
Merge pull request #1 from CoreyGinnivan/JakeGinnivan-patch-1
Scope copied toast
This commit is contained in:
commit
55da52c696
|
@ -243,13 +243,13 @@
|
||||||
`.svg`"
|
`.svg`"
|
||||||
x-bind:download="downloadType === 'download-svg' && item.icon_name"
|
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"
|
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>
|
||||||
<div
|
<div
|
||||||
role="alert"
|
role="alert"
|
||||||
x-show="copied"
|
x-show="copied === item.icon_name"
|
||||||
x-on:show:toast.document="copied = !copied"
|
x-on:show:toast.document="copied = $event.detail"
|
||||||
x-cloak
|
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"
|
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;"
|
style="width: fit-content;"
|
||||||
|
@ -1410,6 +1410,7 @@
|
||||||
search: "",
|
search: "",
|
||||||
downloadType: "copy-svg",
|
downloadType: "copy-svg",
|
||||||
myForData: sourceData,
|
myForData: sourceData,
|
||||||
|
copied: false,
|
||||||
get filteredIcons() {
|
get filteredIcons() {
|
||||||
if (this.search === "") {
|
if (this.search === "") {
|
||||||
return this.myForData;
|
return this.myForData;
|
||||||
|
|
Loading…
Reference in a new issue