Files
spsays-training/components/ui/label.tsx
T
2026-05-30 02:34:22 +05:30

23 lines
578 B
TypeScript

import * as React from "react";
import { cn } from "@/lib/utils";
// Minimal shadcn-style <Label>. We use a native <label> instead of pulling
// in @radix-ui/react-label so the dependency footprint stays small.
function Label({
className,
...props
}: React.LabelHTMLAttributes<HTMLLabelElement>) {
return (
<label
data-slot="label"
className={cn(
"text-sm font-medium leading-none text-foreground select-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
className,
)}
{...props}
/>
);
}
export { Label };