23 lines
578 B
TypeScript
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 };
|