Skip to content

Commit

Permalink
fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
leshak committed Mar 27, 2024
1 parent 8858081 commit c779cea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/demo/IconPack.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
activeIconPath = pageData?.icons[0]?.p || pageData?.path;
}
function onSelelectIcon(name: string) {
function onSelelectIcon(name: string, path: string) {
activeIcon = name;
activeIconPath = path;
copyToClipboard(name);
onNotify(`Copied ${name} to clipboard`);
}
Expand Down Expand Up @@ -128,7 +129,10 @@
</h2>
<div class="flex flex-wrap gap-4">
{#each pageData.icons as it}
<button class="w-[88px] overflow-hidden" on:click={() => onSelelectIcon(it.n)}>
<button
class="w-[88px] overflow-hidden"
on:click={() => onSelelectIcon(it.n, it.p ?? pageData?.path ?? '')}
>
<div
class="w-[88px] h-[68px] flex justify-center border rounded-lg hover:border-[#ff3e00]/10
hover:bg-[#ff3e00]/5 hover:text-[ff3e00] {it.n === activeIcon
Expand Down

0 comments on commit c779cea

Please sign in to comment.