mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 09:28:23 +02:00
* chore(lab): Adjust build scripts * add check workflow * Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * update gitignore --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
29 lines
918 B
TypeScript
29 lines
918 B
TypeScript
import base64SVG from '@lucide/build-icons/utils/base64SVG';
|
|
import defineExportTemplate from '@lucide/build-icons/utils/defineExportTemplate';
|
|
import { toCamelCase } from '@lucide/helpers';
|
|
|
|
export default defineExportTemplate(
|
|
async ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
|
|
const svgContents = await getSvg();
|
|
const svgBase64 = base64SVG(svgContents);
|
|
|
|
return `
|
|
import type { IconNode } from '../types';
|
|
|
|
/**
|
|
* @name ${iconName}
|
|
* @description Lucide Lab SVG icon node.
|
|
*
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
|
* @see https://lucide.dev/guide/packages/lucide - Documentation
|
|
*
|
|
* @returns {Array}
|
|
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
|
*/
|
|
const ${toCamelCase(componentName)}: IconNode = ${JSON.stringify(children)};
|
|
|
|
export default ${toCamelCase(componentName)};
|
|
`;
|
|
},
|
|
);
|