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(
|
|
|
|
|
async ({ iconName, children, getSvg, deprecated, deprecationReason }) => {
|
|
|
|
|
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';
|
|
|
|
|
import type { IconNode, IconProps } from '../types.js';
|
|
|
|
|
|
|
|
|
|
let props: IconProps = $props();
|
|
|
|
|
|
|
|
|
|
const iconNode: IconNode = ${JSON.stringify(children)};
|
|
|
|
|
</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-04-03 16:43:35 +04:00
|
|
|
<Icon name="${iconName}" {...props} iconNode={iconNode} />
|
2025-03-07 13:44:09 +01:00
|
|
|
`;
|
2026-04-24 12:42:50 +04:00
|
|
|
},
|
|
|
|
|
);
|