label.tsx 591 B

12345678910111213141516171819202122
  1. "use client";
  2. import * as React from "react";
  3. import { Label as LabelPrimitive } from "radix-ui";
  4. import { cn } from "@/lib/utils";
  5. const Label = React.forwardRef<
  6. React.ComponentRef<typeof LabelPrimitive.Root>,
  7. React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
  8. >(({ className, ...props }, ref) => (
  9. <LabelPrimitive.Root
  10. ref={ref}
  11. className={cn(
  12. "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
  13. className,
  14. )}
  15. {...props}
  16. />
  17. ));
  18. Label.displayName = LabelPrimitive.Root.displayName;
  19. export { Label };