Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

label.tsx

24 lines591 Bytes

1'use client'
2​
3import * as React from 'react'
4import { Label as LabelPrimitive } from 'radix-ui'
5​
6import cn from '@/utils/cn'
7​
8function Label({
9 className,
10 ...props
11}: React.ComponentProps<typeof LabelPrimitive.Root>) {
12 return (
13 <LabelPrimitive.Root
14 data-slot="label"
15 className={cn(
16 'text-sm leading-4 font-medium text-foreground 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 {...props}
20 />
21 )
23​
24export { Label }