studiobakers / react-ui-toolkit

Bakers Studio's React-based UI Toolkit
MIT License
15 stars 2 forks source link

Toast: Add a limit to the number of toasts that can be visible at one time #112

Closed edizcelik closed 2 years ago

edizcelik commented 3 years ago

Currently we don't have any limit on the number of toasts that can be added to the state. However, there is a requirement I am facing at the moment which states that there should be at most 5 toasts visible on screen at a given time. I believe we can control this behaviour by providing a prop to the ToastProvider and setting up the Toasts for a particular project. By default, we wouldn't add a limit to the number of toasts, but this way we would give a way to control this on the project level.