From 92560a6db2e422fe8b686a5ea5ca9f4faf50dd87 Mon Sep 17 00:00:00 2001 From: John Leider Date: Wed, 7 Feb 2024 20:14:44 -0600 Subject: [PATCH] feat(VSnackbar): pass internal isActive model through activator slot this is in line with how VOverlay does it --- packages/vuetify/src/components/VSnackbar/VSnackbar.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx b/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx index 242232da9e8..f1d67cc25b6 100644 --- a/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx +++ b/packages/vuetify/src/components/VSnackbar/VSnackbar.tsx @@ -21,10 +21,13 @@ import { genOverlays, makeVariantProps, useVariant } from '@/composables/variant import { mergeProps, nextTick, onMounted, onScopeDispose, ref, shallowRef, watch } from 'vue' import { genericComponent, omit, propsFactory, refElement, useRender } from '@/util' +// Types +import type { Ref } from 'vue' + type VSnackbarSlots = { activator: { isActive: boolean, props: Record } default: never - actions: never + actions: { isActive: Ref } text: never } @@ -227,7 +230,7 @@ export const VSnackbar = genericComponent()({ }} >
- { slots.actions() } + { slots.actions({ isActive }) }
)}