timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.73k stars 323 forks source link

Custom output direction #329

Open gustavoalvim41 opened 10 months ago

gustavoalvim41 commented 10 months ago

I would like to know if there is a way to customize the exit direction of Toaster, making them move to the right instead of the default upward direction.

<Toaster
  position="top-right"
  reverseOrder={false}
  containerStyle={{
    top: "11.2rem",
    position: "absolute"
  }}
  toastOptions={{
    style: {
      borderRadius: "0",
      boxShadow: "rgba(99, 99, 99, 0.2) 0 .2rem .8rem 0"
    },
  }}
/>
sameer920 commented 8 months ago

I was just looking at the code and the issues and I think this can be achieved by modifying the exit animation. However, I still don't understand how you would want change the exit direction, maybe through props?

If the maintainers allow me, I will be willing to work on this as it seems like a cool feature to have when I use this library in future as well.