mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 07:37:42 +01:00
feat(icons): add deprecationReason and alias deprecation feature (#1960)
* 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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
|
||||
|
||||
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
|
||||
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
|
||||
const svgContents = getSvg();
|
||||
const svgBase64 = base64SVG(svgContents);
|
||||
|
||||
@@ -17,7 +17,7 @@ import createLucideIcon from '../createLucideIcon';
|
||||
*
|
||||
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
||||
* @returns {JSX.Element} JSX Element
|
||||
* ${deprecated ? '@deprecated' : ''}
|
||||
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
||||
*/
|
||||
const ${componentName} = createLucideIcon('${componentName}', ${JSON.stringify(children)});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user