diff --git a/packages/vaul-vue/src/DrawerRoot.vue b/packages/vaul-vue/src/DrawerRoot.vue index 40d1b68..0194408 100644 --- a/packages/vaul-vue/src/DrawerRoot.vue +++ b/packages/vaul-vue/src/DrawerRoot.vue @@ -28,6 +28,12 @@ const props = withDefaults(defineProps(), { const emit = defineEmits() +const slots = defineSlots<{ + default: (props: { + open: typeof isOpen.value + }) => any +}>() + const fadeFromIndex = computed(() => props.fadeFromIndex ?? (props.snapPoints && props.snapPoints.length - 1)) const open = useVModel(props, 'open', emit, { @@ -71,6 +77,10 @@ function handleOpenChange(o: boolean) { isOpen.value = o } } + +defineExpose({ + open: isOpen, +})