mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-22 20:09:21 +01:00
Support aliased class names in lucide-react
This commit is contained in:
@@ -8,10 +8,12 @@ export default async ({
|
||||
getSvg,
|
||||
deprecated,
|
||||
deprecationReason,
|
||||
iconNameAliases,
|
||||
}) => {
|
||||
const svgContents = await getSvg();
|
||||
const svgBase64 = base64SVG(svgContents);
|
||||
|
||||
|
||||
return `
|
||||
import createLucideIcon from '../createLucideIcon';
|
||||
import { IconNode } from '../types';
|
||||
@@ -29,7 +31,7 @@ export const __iconNode: IconNode = ${JSON.stringify(children)}
|
||||
* @returns {JSX.Element} JSX Element
|
||||
* ${deprecated ? `@deprecated ${deprecationReason}` : ''}
|
||||
*/
|
||||
const ${componentName} = createLucideIcon('${componentName}', __iconNode);
|
||||
const ${componentName} = createLucideIcon('${componentName}', __iconNode${iconNameAliases != null ? `, ${JSON.stringify(iconNameAliases)}` : ''});
|
||||
|
||||
export default ${componentName};
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user