balmjs / balm-ui

:diamonds: A modular and customizable UI library based on Material Design and Vue
https://material.balmjs.com
MIT License
505 stars 30 forks source link

Remove timeout minimum for Snackbar & Toast components? #182

Open nlocascio opened 6 months ago

nlocascio commented 6 months ago

Would you be open to removing the minimum timeout settings on the Snackbar & Toast components?

We have a use case for displaying a notification that persists until the user manually dismisses it (via an action on the Snackbar/Toast itself, or via some other action within the UI), so we'd like to be able to pass 0 or null as the timeout and get a component that doesn't automatically disappear. We have seen this option available on

I would be happy to open a PR with this change if it sounds OK to you.

Thank you!

elf-mouse commented 6 months ago

Hi @nlocascio , the latest/legacy version of <ui-snackbar> has support for this feature (timeoutMs = -1).

And toast has no action buttons by design definition, so there is no need to disable timeoutMs.

Thank you very much :)