17 lines
469 B
TypeScript
17 lines
469 B
TypeScript
import * as React from "react";
|
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
import { cva } from "class-variance-authority";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const labelVariants = cva(
|
|
"leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
);
|
|
|
|
export const Label = ({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof LabelPrimitive.Root>) => (
|
|
<LabelPrimitive.Root className={cn(labelVariants(), className)} {...props} />
|
|
);
|