mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
🚀 Add new /templates utility + add support for web components
This commit is contained in:
@@ -6,13 +6,16 @@
|
||||
import Logo from './icons/logo.svelte';
|
||||
|
||||
import { clipboard } from '@/utils/clipboard';
|
||||
import { getSvgContent } from '@/utils/getSvgContent';
|
||||
|
||||
import GithubIcon from './icons/githubIcon.svelte';
|
||||
import { getSource } from '@/templates/getSource';
|
||||
|
||||
const logoUrl = '/library/svgl.svg';
|
||||
|
||||
const copyToClipboard = async () => {
|
||||
const content = await getSvgContent(logoUrl);
|
||||
const content = await getSource({
|
||||
url: logoUrl
|
||||
});
|
||||
await clipboard(content);
|
||||
toast.success('Copied to clipboard', {
|
||||
description: `Svgl - Library`
|
||||
|
||||
Reference in New Issue
Block a user