Files
web/src/components/ui/label.tsx

25 lines
597 B
TypeScript
Raw Normal View History

2025-03-14 12:40:51 +08:00
"use client"
import * as React from "react"
import * as LabelPrimitive from "@radix-ui/react-label"
2025-03-19 15:49:18 +08:00
import { merge } from "@/lib/utils"
2025-03-14 12:40:51 +08:00
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot="label"
2025-03-19 15:49:18 +08:00
className={merge(
"flex items-center gap-2 leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
2025-03-14 12:40:51 +08:00
className
)}
{...props}
/>
)
}
export { Label }