Skip to content

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

@mirceaulmeanu

Description

@mirceaulmeanu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions