Tool to convert SVG to Svelte component.
npx svg2svelte icon.svg Icon.svelte
const svg2svelte = require('svg2svelte');
await svg2svelte('icon.svg', 'Icon.svelte');
<Icon width="10" height="10" fill="#fff" class="icon" style="background: #fff" />
All props are optional.
if neither width
nor height
is provided, height
will be set to 1em
.