Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toast icon #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Toast icon #69

wants to merge 2 commits into from

Conversation

rawanabbas
Copy link

Added the ability to add icons and/or images to the right of the toast message

@zerodevx
Copy link
Owner

Thanks for the PR - but my first thought is images can already be shown by passing HTML into msg? Something like this: https://svelte.dev/repl/9973db692dbc442599829b7e3babbc64?version=3.55.1

@rawanabbas
Copy link
Author

We thought about this with my team, and we thought adding it as an out of the box feature would be more convenient. But if it doesn't align with your vision for the library we could cancel the PR. Cheers!

@zerodevx
Copy link
Owner

zerodevx commented Mar 1, 2023

I think we can leave this here and gather some feedback for now. I kind of feel that in the current iteration of svelte-toast, the view and logic are too tightly-coupled - something that I hope to fix in the next major.

@AnweshGangula
Copy link

AnweshGangula commented Jan 9, 2024

I think this is a good approach. If we need to pass the HTML into msg, then we need to pass the image in each toast.push. Instead, if we have it in the options we can set an icon during initialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants