mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-23 03:19:22 +01:00
* add pnpm * make it work * fix comamnds in package.jsons * move some scripts to modules * workflow fixes * test workflow * test #2 * minor fix * update lockflite * create workflows * update workflow * Add copy license command * Fix build * update workflows * update contributions.md * migrate site directory to pnpm * Fix peer dependencies when install * fix types in lucide-angular * fix testing
18 lines
469 B
JavaScript
18 lines
469 B
JavaScript
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
import { stringify } from 'svgson';
|
|
|
|
export default ({ iconName, children }) => {
|
|
const iconChildNodes = children.map(([name, attributes]) => ({ name, attributes, children: [] }));
|
|
const iconChildrenHTML = iconChildNodes.map(stringify).join('\n ');
|
|
return `\
|
|
<script>
|
|
import Icon from '../Icon.svelte';
|
|
</script>
|
|
|
|
<Icon name="${iconName}" {...$$props} >
|
|
${iconChildrenHTML}
|
|
<slot/>
|
|
</Icon>
|
|
`;
|
|
};
|