react-toastify icon indicating copy to clipboard operation
react-toastify copied to clipboard

fix(demo): the demo's <ToastContainer /> code isn't working with transition

Open niyasrad opened this issue 11 months ago • 2 comments

Do you want to request a feature or report a bug? Report a bug, from the demo.

What is the current behavior?

  • The bug is not of the library itself, it's from the documentation (demo).
  • The <ToastContainer /> represented side by side to the demo, when provided with decent configuration, provides this result,
<ToastContainer
      position="bottom-right"
      autoClose={3000}
      hideProgressBar={false}
      newestOnTop={false}
      closeOnClick
      rtl={false}
      pauseOnFocusLoss
      draggable
      pauseOnHover
      theme="dark"
      transition: Bounce,
/>

if you can observe, the transition part is enabled with a : whereas, it should actually act like transition={Bounce}. Note: i have linted this markdown with .tsx for the code, and it points and sticks out even here.

What is the expected behavior? The demo is supposed to return the accurate container configuration, which is,

<ToastContainer
      position="bottom-right"
      autoClose={3000}
      hideProgressBar={false}
      newestOnTop={false}
      closeOnClick
      rtl={false}
      pauseOnFocusLoss
      draggable
      pauseOnHover
      theme="dark"
      transition={Bounce}
/>

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? This code, when copied- wouldn't work in any React version, or OS, or browser. It would throw an error and crash the DOM instead.

Additional Information/ Screenshot

image

niyasrad avatar Mar 18 '24 17:03 niyasrad

I am searching this in the code for fixing this bug. but i am not able to find where it is set when i set the project locally and i run then i get a different output and page where transition is not mentioned in the Toast Emitter and Toast Container

AmmarTheDeveloper avatar May 13 '24 06:05 AmmarTheDeveloper

I am searching this in the code for fixing this bug. but i am not able to find where it is set when i set the project locally and i run then i get a different output and page where transition is not mentioned in the Toast Emitter and Toast Container

it is noted, because I tried the same. I believe they haven't updated their CI, or triggered an actual demo replacement with the new code.

@fkhadra can you help here

niyasrad avatar May 13 '24 07:05 niyasrad