custom styles like background-color and color not getting applied through className attribute
Harshsngh07 opened this issue · 3 comments
Harshsngh07 commented
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;
}
Harshsngh07 commented
Tried this className and different classNames but looks like the color and background color is not changing
LautiLosio commented
I'm having the same issue, ended up styling through the style
parameter, not ideal but works...
LWCoder commented
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.