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

parsing for html tags inside toast #480

Closed
wants to merge 12 commits into from

Conversation

borisadamyan
Copy link
Contributor

@borisadamyan borisadamyan commented Aug 21, 2024

I'm opening this again because it's the most requested.

this issue again actual, please reopen this PR
https://github.com/emilkowalski/sonner/pull/350/files

Copy link

vercel bot commented Aug 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 6:15am

@borisadamyan borisadamyan changed the title allow user to use React elements also inside toaster parsing for html tags inside toast Aug 21, 2024
@borisadamyan
Copy link
Contributor Author

@emilkowalski could you please tell us why we removed HTML support from the toaster, in some cases we need to pass HTML tags like etc.

@emilkowalski
Copy link
Owner

I removed it, because the bundle size increased by 300% after the addition of dompurify. I'll explore alternatives soon, unless you want to do so.

Sorry for not informing you earlier!

@borisadamyan
Copy link
Contributor Author

message: <div dangerouslySetInnerHTML={{ __html: message }} />

Thank you! This approach will work for me.

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.

2 participants