fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.3k stars 676 forks source link

Space Between stacked Tooast #1070

Open UsamaAshraf82 opened 3 months ago

UsamaAshraf82 commented 3 months ago

How to decrease the space between stacked tooast I tried decreasing the space using the margins but it only worked with non stacked only

image image

17LingShan commented 2 months ago

Do you mean you want to change the margin of each toast? I think the style prop of toast would help you to catch the result. image

   toast.warn("Success Notification !", {
      position: "top-center",
      style: { marginBottom: "0px" }, // this
    });
    toast.warn("Success Notification !", {
      position: "top-center",
    });
    toast.warn("Success Notification !", {
      position: "top-center",
    });
    toast.warn("Success Notification !", {
      position: "top-center",
    });

Just set the style prop. The type of style is CSSProperties.