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

Show error in Toast Container #1145

Open
mk016 opened this issue Aug 6, 2024 · 0 comments
Open

Show error in Toast Container #1145

mk016 opened this issue Aug 6, 2024 · 0 comments

Comments

@mk016
Copy link

mk016 commented Aug 6, 2024

The ToastContainer example in the react-toastify documentation has a syntax error. The transition prop is incorrectly assigned using the colon : instead of the equals = sign, which causes a syntax error.

Incorrect Code Example
<ToastContainer
position="top-right"
autoClose={5000}
hideProgressBar={false}
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
theme="light"
transition: Bounce,
/>
{/* Same as */}

Correction
The transition prop should be assigned using the equals = sign and the value should be enclosed in quotes.

Correct Code Example


{/* Same as */}

Steps to Reproduce
Copy the incorrect code example from the documentation.
Attempt to use it in a React component.
Observe the syntax error related to the transition prop.
Suggested Fix
Update the documentation to use the correct syntax for the transition prop as shown in the correct code example above.

Screenshot 2024-08-06 at 1 05 35 PM Screenshot 2024-08-06 at 1 05 57 PM
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

1 participant