mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 00:18:20 +01:00
29 lines
758 B
Vue
29 lines
758 B
Vue
<script setup lang="ts">
|
|
import { cn } from "@/lib/utils";
|
|
import { Label, type LabelProps } from "reka-ui";
|
|
import { type HTMLAttributes, computed } from "vue";
|
|
|
|
const props = defineProps<LabelProps & { class?: HTMLAttributes["class"] }>();
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props;
|
|
|
|
return delegated;
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<Label
|
|
data-slot="label"
|
|
v-bind="delegatedProps"
|
|
:class="
|
|
cn(
|
|
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
props.class,
|
|
)
|
|
"
|
|
>
|
|
<slot />
|
|
</Label>
|
|
</template>
|