mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-11 13:28:19 +00:00
33 lines
802 B
JavaScript
33 lines
802 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|||
|
|
import base64SVG from '@lucide/build-icons/utils/base64SVG';
|
||
|
|
|
||
|
|
export default async ({
|
||
|
|
componentName,
|
||
|
|
iconName,
|
||
|
|
getSvg,
|
||
|
|
deprecated,
|
||
|
|
deprecationReason,
|
||
|
|
iconData,
|
||
|
|
}) => {
|
||
|
|
const svgContents = await getSvg();
|
||
|
|
const svgBase64 = base64SVG(svgContents);
|
||
|
|
|
||
|
|
return `
|
||
|
|
import type { LucideIconData } 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}: LucideIconData = ${JSON.stringify(iconData)}
|
||
|
|
|
||
|
|
export default ${componentName};
|
||
|
|
`;
|
||
|
|
};
|