2024-11-30 00:58:04 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { cn } from "@/lib/utils";
|
2025-04-10 13:55:56 +02:00
|
|
|
import { reactiveOmit } from "@vueuse/core";
|
2024-11-30 00:58:04 +01:00
|
|
|
import {
|
|
|
|
|
DropdownMenuLabel,
|
|
|
|
|
type DropdownMenuLabelProps,
|
|
|
|
|
useForwardProps,
|
2025-03-28 01:16:24 +01:00
|
|
|
} from "reka-ui";
|
2025-04-10 13:55:56 +02:00
|
|
|
import type { HTMLAttributes } from "vue";
|
2024-11-30 00:58:04 +01:00
|
|
|
|
|
|
|
|
const props = defineProps<
|
|
|
|
|
DropdownMenuLabelProps & {
|
|
|
|
|
class?: HTMLAttributes["class"];
|
|
|
|
|
inset?: boolean;
|
|
|
|
|
}
|
|
|
|
|
>();
|
|
|
|
|
|
2025-04-10 13:55:56 +02:00
|
|
|
const delegatedProps = reactiveOmit(props, "class", "inset");
|
2024-11-30 00:58:04 +01:00
|
|
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-03-28 01:16:24 +01:00
|
|
|
<DropdownMenuLabel
|
2025-04-10 13:55:56 +02:00
|
|
|
data-slot="dropdown-menu-label"
|
|
|
|
|
:data-inset="inset ? '' : undefined"
|
2025-03-28 01:16:24 +01:00
|
|
|
v-bind="forwardedProps"
|
2025-04-10 13:55:56 +02:00
|
|
|
:class="cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', props.class)"
|
2025-03-28 01:16:24 +01:00
|
|
|
>
|
|
|
|
|
<slot />
|
|
|
|
|
</DropdownMenuLabel>
|
2024-11-30 00:58:04 +01:00
|
|
|
</template>
|