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

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

@fkhadra fkhadra mentioned this issue Jun 11, 2023
@fkhadra fkhadra added the Merged in next Merged but not live label Jun 16, 2023
@fkhadra fkhadra closed this as completed Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged in next Merged but not live
Projects
None yet
Development

No branches or pull requests

2 participants