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

custom styles like background-color and color not getting applied through className attribute #107

Open
Harshsngh07 opened this issue Aug 2, 2022 · 3 comments

Comments

@Harshsngh07
Copy link

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
Copy link
Author

Tried this className and different classNames but looks like the color and background color is not changing

@LautiLosio
Copy link

I'm having the same issue, ended up styling through the style parameter, not ideal but works...

@LWCoder
Copy link

LWCoder commented Oct 3, 2022

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.

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

No branches or pull requests

3 participants