0

I need to customize react-toastify.

I tried to follow the advice from the documentation and change the styles in the .scss file. unfortunately this didn't work. tell me what am I doing wrong? I want notifications to look like on the picture how I want it to look

reduce10
  • 1
  • 2
  • You should share the corresponding part of your code so we can check it out and tell you what you did wrong. – fatih.jsx Jan 24 '23 at 12:13

2 Answers2

0

You can use this method in App.js :

   <ToastContainer
       position="bottom-right"
       autoClose={8000}
       pauseOnHover={true}
       draggable={true}
       theme="dark"
    />

here the toast appears on the bottom-right side, it is automatically closed after 8 seconds and its background theme is dark.

Sujith Kumar
  • 872
  • 6
  • 19
0

Add a style attribute like this:

     <ToastContainer
        position="bottom-right"
        autoClose={8000}
        pauseOnHover={true}
        draggable={true}
        theme="dark"
        style={{width: "100px"}}
      />
Sujith Kumar
  • 872
  • 6
  • 19