2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-13 22:18:24 +00:00
iconify/components/svelte/src/OfflineIcon.svelte
2022-05-12 22:39:56 +03:00

35 lines
548 B
Svelte

<script context="module">
// Export stuff.
// Important: duplicate of offline-iconify.ts. When changing exports, they must be changed in both files.
import {
addIcon,
addCollection
} from './offline-functions';
export {
addIcon,
addCollection
}
</script>
<script>
import { generateIcon } from './offline-functions';
// Generated data
let data;
$: {
data = generateIcon($$props);
}
</script>
{#if data}
{#if data.svg}
<svg {...data.attributes}>
{@html data.body}
</svg>
{:else}
<span {...data.attributes} />
{/if}
{/if}