Skip to content

Commit b78bbce

Browse files
committed
fix(toast): remove method
1 parent 5ce3ece commit b78bbce

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/olive-suits-clean.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@zag-js/toast": patch
3+
---
4+
5+
Fix issue where calling `toast.remove()` without an id show a TS Error.

packages/machines/toast/src/toast.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export interface ToastStore<V = any> {
281281
/**
282282
* Remove a toast by its ID
283283
*/
284-
remove: (id: string) => void
284+
remove: (id?: string) => void
285285
/**
286286
* Dismiss a toast by its ID. If no ID is provided, dismisses all toasts
287287
*/

0 commit comments

Comments
 (0)