timolins / react-hot-toast

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

Can i use toast.promise with position option? #162

Closed gondar00 closed 2 years ago

gondar00 commented 2 years ago

Hi, I would like to know if I can use toast.promise(...) and also position it programmatically ?

timolins commented 2 years ago

Yes. You can pass position to the toast options (third argument):

toast.promise(myPromise, {
  loading: "Loading",
  success: "Done",
  error: "Error",
}, {
  position: "bottom-center"
})