mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-09-02 18:38:49 +02:00
* feat(packages): added lucide icons package skeleton
* feat(packages): added initial commit of @lucide/icons
* fix: fixed linting issues introduced in c4e5730bc4 (#3858)
* fix(packages/icons): update package, remove UMD export
* fix(packages/icons): update github actions
* docs(packages/icons): add documentation for various helpers and types
* fix(.github/ISSUE_TEMPLATE): fix linting issue (@ is a reserved character)
* fix(packages/icons): fix linting issues in configs
* feat(packages/icons): rename from packages/lucide-icons => packages/icons
* fix(pnpm): update lockfile
* fix(packages/icons): update readme and documentation
* fix(packages/icons): update absoluteStrokeWidth implementation
* test(packages/icons): update absoluteStrokeWidth unit test
* feat(packages/icons): add backwards compatible alias support in buildLucideIconNode
* feat(packages/icons): fix linting issues in build tools
* fix(packages/icons): rename LucideIcon => LucideIconData
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
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};
|
|
`;
|
|
};
|