2024-12-09 16:52:04 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { cn } from "@/lib/utils";
|
2025-03-28 01:16:24 +01:00
|
|
|
import type { DialogOverlayProps } from "reka-ui";
|
2024-12-09 16:52:04 +01:00
|
|
|
import { DrawerOverlay } from "vaul-vue";
|
|
|
|
|
import { type HtmlHTMLAttributes, computed } from "vue";
|
|
|
|
|
|
|
|
|
|
const props = defineProps<
|
|
|
|
|
DialogOverlayProps & { class?: HtmlHTMLAttributes["class"] }
|
|
|
|
|
>();
|
|
|
|
|
|
|
|
|
|
const delegatedProps = computed(() => {
|
|
|
|
|
const { class: _, ...delegated } = props;
|
|
|
|
|
|
|
|
|
|
return delegated;
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<DrawerOverlay v-bind="delegatedProps" :class="cn('fixed inset-0 z-50 bg-black/80', props.class)" />
|
|
|
|
|
</template>
|