Open zheleznov163 opened 2 years ago
I agree that it should close automatically when no bottom sheet is open. Furthermore we should provide a method that accepts the error text or an array of errors and automatically opens it when the array is not empty or the string is not empty and closes it otherwise.
It's not a bad implementation but if the message is set while no modal is open (maybe an async request started and then the modal was closed by the user) the alert is going to show up anyway. Also the current closing animation feels strange, it fades and then blinks back to fully visible
Add a global error notification. You need to decide how long the message will last. It's probably best to only display if there are errors in the open bottomsheet, and hide it when trying to collapse the bottomsheet.