From 82d619b2a75b9d08f3f5b314d37c30d77d8341e9 Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 22 Apr 2024 11:01:48 +0200 Subject: [PATCH] feat(useToast): allow clearing all notifications (#1695) --- src/runtime/composables/useToast.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runtime/composables/useToast.ts b/src/runtime/composables/useToast.ts index 1e7143da..dfc65ea8 100644 --- a/src/runtime/composables/useToast.ts +++ b/src/runtime/composables/useToast.ts @@ -30,9 +30,14 @@ export function useToast () { } } + function clear () { + notifications.value = [] + } + return { add, remove, - update + update, + clear } }