timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.84k stars 331 forks source link

Remove direct style insertions #208

Closed jd-carroll closed 11 months ago

jd-carroll commented 2 years ago

Here is a proposal of what I think would be a good first step towards CSP compatible hot toast 😄

I'm not 100% on why casting a React.CSSProperties to goober.CSSAttribute is necessary (or how it even works), but it does seem to be...

May want to examine that a bit more, I suspect there is something I am missing that could be problematic.

However, if this does work, then the great news is that there are no breaking changes!


Fixes #138

vercel[bot] commented 2 years ago

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

Name Status Preview Updated
react-hot-toast ✅ Ready (Inspect) Visit Preview Aug 21, 2022 at 0:26AM (UTC)