1<script lang="ts">
2 import { Label as LabelPrimitive } from 'bits-ui';
3 import { cn } from '$lib/components/ui/utils.js';
4
5 let {
6 ref = $bindable(null),
7 class: className,
8 ...restProps
9 }: LabelPrimitive.RootProps = $props();
10</script>
11
12<LabelPrimitive.Root
13 bind:ref
14 data-slot="label"
15 class={cn(
16 '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',
17 className
18 )}
19 {...restProps}
20/>