Codewise
Courses
My learning
Ideas
Leaderboard
YouTube
Courses
My learning
Ideas
Leaderboard
YouTube
Sign in
src/components/ui/label.tsx · AI Code Reviewer | Codewise
AI Code Reviewer
ai-code-reviewer
/
src
/
components
/
ui
/
label.tsx
label.tsx
24 lines, 606 B
Raw
1
"use client"
2
3
import
*
as
React
from
"react"
4
import
{ Label
as
LabelPrimitive }
from
"radix-ui"
5
6
import
{ cn }
from
"@/lib/utils"
7
8
function
Label
({
9
className
,
10
...
props
11
}
:
React
.
ComponentProps
<
typeof
LabelPrimitive.Root>) {
12
return
(
13
<
LabelPrimitive.Root
14
data-slot
=
"label"
15
className
={
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
{...
props
}
20
/>
21
)
22
}
23
24
export
{ Label }