2025-06-18 15:47:24 +02:00
|
|
|
import base64SVG from '@lucide/build-icons/utils/base64SVG';
|
2026-04-24 12:42:50 +04:00
|
|
|
import { getHTMLBanner } from './license.mts';
|
2025-06-18 15:47:24 +02:00
|
|
|
import defineExportTemplate from '@lucide/build-icons/utils/defineExportTemplate';
|
2025-03-07 13:44:09 +01:00
|
|
|
|
2026-04-24 12:42:50 +04:00
|
|
|
export default defineExportTemplate(
|
2026-09-04 16:38:01 +02:00
|
|
|
async ({ iconName, iconData, getSvg, deprecated, deprecationReason }) => {
|
2026-04-24 12:42:50 +04:00
|
|
|
const svgContents = await getSvg();
|
|
|
|
|
const svgBase64 = base64SVG(svgContents);
|
2025-03-07 13:44:09 +01:00
|
|
|
|
2026-04-24 12:42:50 +04:00
|
|
|
return `\
|
|
|
|
|
${getHTMLBanner()}
|
2025-03-07 13:44:09 +01:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Icon from '../Icon.svelte';
|
2026-09-04 16:38:01 +02:00
|
|
|
import type { LucideProps, LucideIconData } from '../types.js';
|
2025-03-07 13:44:09 +01:00
|
|
|
|
2026-09-04 16:38:01 +02:00
|
|
|
let props: LucideProps = $props();
|
|
|
|
|
|
|
|
|
|
const iconData: LucideIconData = ${JSON.stringify(iconData)};
|
2025-03-07 13:44:09 +01:00
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-04-24 12:42:50 +04:00
|
|
|
<!--
|
|
|
|
|
@component
|
|
|
|
|
|
|
|
|
|
Lucide SVG icon component, renders SVG Element with children.
|
|
|
|
|
|
|
|
|
|
@preview  - https://lucide.dev/icons/${iconName}
|
|
|
|
|
@see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
|
|
|
${deprecated ? `\n@deprecated ${deprecationReason}\n` : ''}\
|
|
|
|
|
-->
|
|
|
|
|
|
2026-09-04 16:38:01 +02:00
|
|
|
<Icon {...props} icon={iconData} />
|
2025-03-07 13:44:09 +01:00
|
|
|
`;
|
2026-04-24 12:42:50 +04:00
|
|
|
},
|
|
|
|
|
);
|