kbrgl / svelte-french-toast

🍞🥂 Buttery smooth toast notifications for Svelte
https://svelte-french-toast.vercel.app/
MIT License
808 stars 28 forks source link

Are there any real examples of using rich text and promise toasts? #23

Closed jakubdonovan closed 1 year ago

jakubdonovan commented 1 year ago

I'm looking through the docs and I can't figure out how to use rich text in my toasts. Are there any real examples?

kbrgl commented 1 year ago

If you scroll down to the bottom of the docs, there should be a button called "Rich content" that shows you a demo of rich text as well as how to implement it. You need to create a Svelte component (say RichText.svelte) which contains your rich text (i.e. any HTML markup). Then just import it wherever you're creating your toasts and call toast with toast(RichText).

kbrgl commented 1 year ago

Let me know if that works for you or if you have a different use case that's not addressed by the docs! Closing this issue for now, but feel free to reopen if this is inadequate.