2024-12-09 16:52:04 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import type { DrawerTitleProps } from "vaul-vue";
|
|
|
|
|
import { DrawerTitle } from "vaul-vue";
|
2025-06-26 22:39:02 +02:00
|
|
|
import { computed, type HtmlHTMLAttributes } from "vue";
|
|
|
|
|
import { cn } from "@/lib/utils";
|
2024-12-09 16:52:04 +01:00
|
|
|
|
|
|
|
|
const props = defineProps<
|
|
|
|
|
DrawerTitleProps & { class?: HtmlHTMLAttributes["class"] }
|
|
|
|
|
>();
|
|
|
|
|
|
|
|
|
|
const delegatedProps = computed(() => {
|
|
|
|
|
const { class: _, ...delegated } = props;
|
|
|
|
|
|
|
|
|
|
return delegated;
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-04-10 13:55:56 +02:00
|
|
|
<DrawerTitle
|
|
|
|
|
data-slot="drawer-title"
|
|
|
|
|
v-bind="delegatedProps"
|
|
|
|
|
:class="cn('text-foreground font-semibold', props.class)"
|
|
|
|
|
>
|
2024-12-09 16:52:04 +01:00
|
|
|
<slot />
|
|
|
|
|
</DrawerTitle>
|
|
|
|
|
</template>
|