Closed sandros94 closed 5 days ago
Hi @sandros94 ! Thanks for the PR. I think your proposal make sense 👍🏻
In order to support :duration="0"
, we need to adjust this to nullish coalescing operator as well
const duration = computed(() => props.duration && providerContext.duration.value)
we need to adjust this to nullish coalescing operator as well
instead of a nullish coalescing operator (that would return undefined
if props.duration
isn't set) I decided to explicitly check if the type is a number, otherwise use the provider's value/default
This is a follow-up from https://github.com/nuxt/ui/issues/2665
Currently the Toast's duration only starts the timer if false or infinite.
But having a negative duration should also trigger a Toast without a timer.