fumeapp / tailvue

Vue components built for Nuxt3|Vue3 powered by Windi CSS|tailwindcss
157 stars 14 forks source link

Feature suggestion - Add option to pause toast timeout when hovering #20

Closed hfoletto closed 1 year ago

hfoletto commented 1 year ago

I've been using this package with Nuxt 3 with great success!

This issue is just a suggestion to add an option (or make it the default) to pause the toast timeout when hovering. In my specific case I use a danger toast to show errors/exceptions, and a 6 seconds is enough, but in some cases the message is very long, so it could be useful to pause the timeout when hovering.

Thank you!

acidjazz commented 1 year ago

Great idea - i think this is possible by tracking a ref variable using @mouseover and @mouseleave on the top div here

you can then intercept updateTime here and just return if that variable is true - this will be cool because itll also halt the progress bar

happy to try this out when i get time - feel free to create a PR as well @hfoletto. !

hfoletto commented 1 year ago

Thank you @acidjazz! The PR is up #21