poppa / sveltekit-svg

SvelteKit plugin that makes it possible to import SVG files as Svelte components, inline SVG code or urls
MIT License
235 stars 23 forks source link

Render the contents of the `<svg>` tag using `{@html}` in the component mode #40

Closed aradalvand closed 1 year ago

aradalvand commented 1 year ago

Closes #39

I also replaced SvelteComponentTyped with SvelteComponent in svg.d.ts since SvelteComponentTyped is deprecated in Svelte 4 — see this.

aradalvand commented 1 year ago

One unrelated thing by the way: The TypeScript section in the README currently states that you should copy-and-paste those TypeScript declarations into a svg.d.ts file in your project; but since sveltekit-svg already comes with the svg.d.ts file included, can't users instead simply import it in their app.d.ts or whatever? Like so:

import '@poppanator/sveltekit-svg/dist/svg';

This seems to work just as well. So, should I update the README to reflect this?

poppa commented 1 year ago

One unrelated thing by the way: The TypeScript section in the README currently states that you should copy-and-paste those TypeScript declarations into a svg.d.ts file in your project; but since sveltekit-svg already comes with the svg.d.ts file included, can't users instead simply import it in their app.d.ts or whatever? Like so:

import '@poppanator/sveltekit-svg/dist/svg';

This seems to work just as well. So, should I update the README to reflect this?

That's a good point. Feel free to update the README :)

aradalvand commented 1 year ago

@poppa Done :)

aradalvand commented 1 year ago

@poppa Thanks! When will this be released if I may ask?