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

SvelteComponent not needed as causing issues passing props #60

Closed sansjack closed 4 months ago

sansjack commented 4 months ago

Since this type changed svelte5 does not need the SvelteComponent as this is was expecting children as a prop and not each props such as class etc.

This should fix the typing and allow us to pass svelte component attributes:

Before:

image

After Requested Change:

image

this may not be the correct approach so please add your two cents!

59

poppa commented 4 months ago

Thanks for your contribution, it's much appreciated 😀

sansjack commented 4 months ago

Thanks for your contribution, it's much appreciated 😀

you're more than welcome, thanks for making this!! i think this needs to be revisited as the typing is not 100% correct... but it works better :)