mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
26 lines
769 B
JavaScript
26 lines
769 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
|
|
import { toCamelCase } from '@lucide/helpers';
|
|
|
|
export default ({ iconName, children, getSvg, deprecated, deprecationReason }) => {
|
|
const svgContents = getSvg();
|
|
const svgBase64 = base64SVG(svgContents);
|
|
const exportName = toCamelCase(iconName)
|
|
|
|
return `
|
|
import { IconNode } from '../types';
|
|
/**
|
|
* @name ${iconName}
|
|
* @description Lucide SVG string.
|
|
*
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
|
*
|
|
* @returns {IconNode}
|
|
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
|
*/
|
|
const _${exportName}: IconNode = ${JSON.stringify(children)}
|
|
|
|
export default _${exportName};
|
|
`;
|
|
};
|