fix(toast): show animation when closing all modals (#5637)

* fix(toast): show animation when closing all modals

* chore(changeset): add issue number

---------

Co-authored-by: WK <wingkwong.code@gmail.com>
This commit is contained in:
Anshuman Singh Rathore 2025-08-30 08:44:54 +05:30 committed by GitHub
parent 3ba7d29848
commit afe2f977fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"@heroui/toast": patch
---
show animation when closing all modals (#5620)

View File

@ -82,7 +82,9 @@ export const closeAll = () => {
const keys = globalToastQueue.visibleToasts.map((toast) => toast.key);
keys.map((key) => {
globalToastQueue?.close(key);
keys.forEach((key, index) => {
setTimeout(() => {
globalToastQueue?.close(key);
}, index * 100);
});
};