Files
BRETT/app/components/ui/field/FieldLabel.vue
T
2026-10-03 20:07:49 +02:00

23 lines
670 B
Vue

<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Label } from '@/components/ui/label'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>
<template>
<Label
data-slot="field-label"
:class="cn(
'has-data-checked:bg-input/30 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 group/field-label peer/field-label flex w-fit leading-snug',
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',
props.class,
)"
>
<slot />
</Label>
</template>