frontend/components/ui/dialog/DialogTitle.vue

28 lines
661 B
Vue
Raw Normal View History

2024-11-30 19:15:23 +01:00
<script setup lang="ts">
import { cn } from "@/lib/utils";
import { DialogTitle, type DialogTitleProps, useForwardProps } from "reka-ui";
2024-11-30 19:15:23 +01:00
import { type HTMLAttributes, computed } from "vue";
const props = defineProps<
DialogTitleProps & { class?: HTMLAttributes["class"] }
>();
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props;
return delegated;
});
const forwardedProps = useForwardProps(delegatedProps);
</script>
<template>
<DialogTitle
data-slot="dialog-title"
2024-11-30 19:15:23 +01:00
v-bind="forwardedProps"
:class="cn('text-lg leading-none font-semibold', props.class)"
2024-11-30 19:15:23 +01:00
>
<slot />
</DialogTitle>
</template>