huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.03k stars 252 forks source link

svelte-sonner slots #1062

Open Carlos-err406 opened 2 weeks ago

Carlos-err406 commented 2 weeks ago

Describe the feature

the original svelte-sonner provides slots for modifying the default iconst of the toast see this section of the svelte-sonner readme

my request is to add those slots to the installed component to make it more extendable, and so users dont have to modify the /ui/sonner.svelte component just to add them

Carlos-err406 commented 2 weeks ago

also i would be glad to work on this, and if needed update the docs

huntabyte commented 2 weeks ago

That would be great @Carlos-err406 !

Carlos-err406 commented 2 weeks ago

@huntabyte Do you think it's sane to copy and paste the Icon and Loader components from svelte-sonner, to use as default values of the slots, or is it better to get a quick PR on svelte-sonner to export the Icon component (and Loader) to the index? i dont know their stand on that though

or maybe is preferable to just use lucide-svelte icons and forget about the defaults of svelte-sonner?

Carlos-err406 commented 2 weeks ago

tried the lucide icons approach, i think it came out pretty nice