mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-16 14:18:29 +00:00
* Adjust typescript types * adjust types * fix types in all helper files * Fix types * Migrate js files to ts files * Refactor to TS files * Rename extentions * Adjust imports * Fix builds * Update lockfile * Fix last typescript migration * Fix entry path @lucide/outline-svg * Fix types * add checkout step * format files * Format files
34 lines
895 B
TypeScript
34 lines
895 B
TypeScript
import base64SVG from '@lucide/build-icons/utils/base64SVG';
|
|
import defineExportTemplate from '@lucide/build-icons/utils/defineExportTemplate';
|
|
|
|
export default defineExportTemplate(async ({
|
|
componentName,
|
|
iconName,
|
|
children,
|
|
getSvg,
|
|
deprecated,
|
|
deprecationReason,
|
|
}) => {
|
|
const svgContents = await getSvg();
|
|
const svgBase64 = base64SVG(svgContents);
|
|
|
|
return `
|
|
import defaultAttributes from '../defaultAttributes';
|
|
import type { IconNode } from '../types';
|
|
|
|
/**
|
|
* @name ${iconName}
|
|
* @description Lucide SVG icon node.
|
|
*
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
|
* @see https://lucide.dev/guide/packages/lucide - Documentation
|
|
*
|
|
* @returns {Array}
|
|
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
|
*/
|
|
const ${componentName}: IconNode = ${JSON.stringify(children)}
|
|
|
|
export default ${componentName};
|
|
`;
|
|
});
|