toastify-js
toastify-js copied to clipboard
custom styles like background-color and color not getting applied through className attribute
In Index.js
Toastify({
text: "This is a toast",
duration: 3000,
gravity: topbottomValue,
position: leftrightValue,
className: "info",
}).showToast();
In index.css
.info{
background-color: red;
}
Tried this className and different classNames but looks like the color and background color is not changing
I'm having the same issue, ended up styling through the style
parameter, not ideal but works...
I had the same issue, but it was because the default toastify.css was setting the background color. After removing those lines I can now use className to style the background.