mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-21 19:49:22 +01:00
Add support for icon alias classnames in lucide-svelte
This commit is contained in:
@@ -9,6 +9,7 @@ export default async ({
|
||||
getSvg,
|
||||
deprecated,
|
||||
deprecationReason,
|
||||
iconNameAliases
|
||||
}) => {
|
||||
const svgContents = await getSvg();
|
||||
const svgBase64 = base64SVG(svgContents);
|
||||
@@ -36,7 +37,9 @@ const iconNode: IconNode = ${JSON.stringify(children)};
|
||||
*/
|
||||
</script>
|
||||
|
||||
<Icon name="${iconName}" {...$$props} iconNode={iconNode}>
|
||||
<Icon name="${iconName}" {...$$props} iconNode={iconNode}${
|
||||
iconNameAliases != null ? ` aliasNames={${JSON.stringify(iconNameAliases)}}` : ''
|
||||
}>
|
||||
<slot/>
|
||||
</Icon>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user