2025-09-11 14:38:34 +02:00
|
|
|
import base64SVG from '@lucide/build-icons/utils/base64SVG';
|
|
|
|
|
import defineExportTemplate from '@lucide/build-icons/utils/defineExportTemplate';
|
2021-05-20 21:24:54 +02:00
|
|
|
|
2026-09-04 16:38:01 +02:00
|
|
|
export default defineExportTemplate(
|
|
|
|
|
async ({ componentName, iconName, iconData, getSvg, deprecated, deprecationReason }) => {
|
|
|
|
|
const svgContents = await getSvg();
|
|
|
|
|
const svgBase64 = base64SVG(svgContents);
|
2024-01-07 15:59:19 +01:00
|
|
|
|
2026-09-04 16:38:01 +02:00
|
|
|
return `
|
2024-01-07 15:59:19 +01:00
|
|
|
import createLucideIcon from '../createLucideIcon';
|
2026-09-10 22:35:01 +02:00
|
|
|
import type { LucideIcon, LucideIconData } from '../types';
|
2025-09-11 14:38:34 +02:00
|
|
|
|
2026-09-04 16:38:01 +02:00
|
|
|
export const __iconData: LucideIconData = ${JSON.stringify(iconData)}
|
2024-01-07 15:59:19 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @component @name ${componentName}
|
|
|
|
|
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
|
|
|
*
|
|
|
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
2026-01-02 09:47:29 +01:00
|
|
|
* @see https://lucide.dev/guide/packages/lucide-vue-next - Documentation
|
2024-01-07 15:59:19 +01:00
|
|
|
*
|
|
|
|
|
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
2026-01-02 09:47:29 +01:00
|
|
|
* @returns {FunctionalComponent} Vue component
|
2024-05-22 13:08:34 +02:00
|
|
|
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
2024-01-07 15:59:19 +01:00
|
|
|
*/
|
2026-09-10 22:35:01 +02:00
|
|
|
const ${componentName}: LucideIcon = createLucideIcon(__iconData);
|
2021-05-20 21:24:54 +02:00
|
|
|
|
|
|
|
|
export default ${componentName};
|
|
|
|
|
`;
|
2026-09-04 16:38:01 +02:00
|
|
|
},
|
|
|
|
|
);
|