mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 18:47:43 +01:00
* feat(icons): add deprecationReason and alias deprecation feature * chore(tools): run prettier. again. * fix(scripts): overall alias as object support * fix(icon.schema.json): add dependentRequired on deprecated properties * fix(icon.schema.json): remove unicode for now * fix(icon.schema.json): use const true for deprecated * fix(build): convert deprecation reason to enum * fix(build): fix linting of icon.schema.json * fix(build): renamed gracePeriod => toBeRemovedInVersion * fix(build): fix aliases map in related icons generation * fix(build): deprecate aliases using numbers * feat(icon-schema): separate deprecation reason enumerations, extract removal notice * fix(icon-schema): fix linting * Update tools/build-icons/utils/deprecationReasonTemplate.mjs * fix(icons): add deprecation reason to some more icons * fix(docs): fix linting issue --------- Co-authored-by: Karsa <karsa@sztaki.hu> Co-authored-by: Jakob Guddas <github@jguddas.de>
27 lines
979 B
JavaScript
27 lines
979 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
|
|
|
|
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
|
|
const svgContents = getSvg();
|
|
const svgBase64 = base64SVG(svgContents);
|
|
|
|
return `
|
|
import createLucideIcon from '../createLucideIcon';
|
|
|
|
/**
|
|
* @component @name ${componentName}
|
|
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
*
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
|
* @see https://lucide.dev/guide/packages/lucide-vue-next - Documentation
|
|
*
|
|
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
* @returns {FunctionalComponent} Vue component
|
|
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
|
*/
|
|
const ${componentName} = createLucideIcon('${componentName}Icon', ${JSON.stringify(children)});
|
|
|
|
export default ${componentName};
|
|
`;
|
|
};
|