2025-02-06 07:44:47 +01:00
|
|
|
/* 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 `
|
2025-02-06 08:09:57 +01:00
|
|
|
import { IconNode } from '../types';
|
2025-02-06 07:44:47 +01:00
|
|
|
/**
|
|
|
|
|
* @name ${iconName}
|
|
|
|
|
* @description Lucide SVG string.
|
|
|
|
|
*
|
|
|
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
|
|
|
|
*
|
|
|
|
|
* @returns {IconNode}
|
|
|
|
|
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
|
|
|
|
*/
|
2025-02-10 13:58:34 +01:00
|
|
|
const _${exportName}: IconNode = ${JSON.stringify(children)}
|
2025-02-06 07:44:47 +01:00
|
|
|
|
2025-02-06 08:09:57 +01:00
|
|
|
export default _${exportName};
|
2025-02-06 07:44:47 +01:00
|
|
|
`;
|
|
|
|
|
};
|