diff --git a/src/components/svgCard.svelte b/src/components/svgCard.svelte index d5a0137..828a40c 100644 --- a/src/components/svgCard.svelte +++ b/src/components/svgCard.svelte @@ -44,8 +44,13 @@ // Download SVG: const downloadSvg = (url?: string) => { download(url || ''); + + const category = Array.isArray(svgInfo.category) + ? svgInfo.category.sort().join(' - ') + : svgInfo.category; + toast.success(`Downloading...`, { - description: `${svgInfo.title} - ${svgInfo.category}` + description: `${svgInfo.title} - ${category}` }); }; @@ -81,8 +86,12 @@ download(content, `${svgInfo.title}.zip`, 'application/zip'); }); + const category = Array.isArray(svgInfo.category) + ? svgInfo.category.sort().join(' - ') + : svgInfo.category; + toast.success('Downloading light & dark variants...', { - description: `${svgInfo.title} - ${svgInfo.category}` + description: `${svgInfo.title} - ${category}` }); }; @@ -105,22 +114,26 @@ await navigator.clipboard.writeText(content); } + const category = Array.isArray(svgInfo.category) + ? svgInfo.category.sort().join(' - ') + : svgInfo.category; + if (isInFigma) { toast.success('Ready to paste in Figma!', { - description: `${svgInfo.title} - ${svgInfo.category}` + description: `${svgInfo.title} - ${category}` }); return; } if (wordmarkSvg) { toast.success('Copied wordmark SVG to clipboard!', { - description: `${svgInfo.title} - ${svgInfo.category}` + description: `${svgInfo.title} - ${category}` }); return; } toast.success('Copied to clipboard!', { - description: `${svgInfo.title} - ${svgInfo.category}` + description: `${svgInfo.title} - ${category}` }); }; @@ -178,6 +191,25 @@
{svgInfo.title}
+