Openstatus www.openstatus.dev
at 4c0f4c00a38753a5d0dfd7e7b7b7706dec6f1503 28 lines 836 B view raw
1// THIS IS **NOT** a shadcn ui component. TBD if we want to keep `import/consistent-type-specifier-style` 2// https://ui.shadcn.com/docs/components/label 3 4"use client"; 5 6import { cva } from "class-variance-authority"; 7import type { VariantProps } from "class-variance-authority"; 8import * as React from "react"; 9 10import { cn } from "../lib/utils"; 11 12const labelVariants = cva( 13 "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", 14); 15 16export interface LabelProps 17 extends React.LabelHTMLAttributes<HTMLLabelElement>, 18 VariantProps<typeof labelVariants> {} 19 20const Label = React.forwardRef<HTMLLabelElement, LabelProps>( 21 ({ className, ...props }, ref) => ( 22 <label ref={ref} className={cn(labelVariants(), className)} {...props} /> 23 ), 24); 25 26Label.displayName = "Label"; 27 28export { Label };