Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

className from ToastOptions overrides the toastClassName in ToastContainer props instead of appending #956

Closed
mirceaulmeanu opened this issue May 12, 2023 · 0 comments
Labels
Merged in next Merged but not live

Comments

@mirceaulmeanu
Copy link

Hello, I don't know if this is a feature or a bug but this is what happens.
Using this:

const StyledToastContainer = styled(ToastContainer).attrs({
  toastClassName: "my-toast",
})`
  .my-toast {
    /* some styling here*/
  }
`

and then this:
toast(<MySuperToast />, {className: "awesome-toast"})
the className from when I'm calling toast (awesome-toast) overrides the toastClassName from the ToastContainer (my-toast) and I lose the styling.
I would expect the classes to append and have both "my-toast" and "awesome-toast" added to the element with the class "Toastify__toast"

Thank you

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Merged in next Merged but not live
Projects
None yet
Development

No branches or pull requests

2 participants