nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.08k stars 529 forks source link

[v3] Toast `duration` 0 does not work #2665

Open sandros94 opened 5 hours ago

sandros94 commented 5 hours ago

In UI v2 we could set the duration of a Notification to 0 to disable its timer. In v3 this functionality doesn't work.

Reproduction

Open v3's Toast docs and set the duration to 0.

Description

upstream they have if (!duration || duration === Number.POSITIVE_INFINITY) to determine if a notification should be created without a timer.

Personally I don't see an use for a notification that lasts for 0ms or less. So any value like infinite, 0 or negative should trigger a notification without a timer.

sandros94 commented 5 hours ago

@zernonia do you think this should also be implemented upstream?