import * as LabelPrimitive from '@radix-ui/react-label';

import { ComponentPropsWithRef, FC } from 'react';
import { cn } from '@/lib/utils';

const Label: FC<ComponentPropsWithRef<typeof LabelPrimitive.Root>> = ({
  ref,
  className,
  ...props
}) => (
  <LabelPrimitive.Root
    ref={ref}
    className={cn(
      'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
      className,
    )}
    {...props}
  />
);
Label.displayName = LabelPrimitive.Root.displayName;

export { Label };
