Skip to content

Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.

689 B
Raw Blame
"use client";

import * as React from "react";

import { cn } from "@/lib/utils";

const Label = React.memo(
  React.forwardRef<
    HTMLLabelElement,
    React.LabelHTMLAttributes<HTMLLabelElement>
  >(({ className, ...props }, ref) => {
    return (
      // oxlint-disable-next-line jsx-a11y/label-has-associated-control -- primitive wrapper; callers pass `htmlFor`
      <label
        ref={ref}
        className={cn(
          "block text-pretty text-xs font-medium text-gray-900 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:text-slate-50",
          className,
        )}
        {...props}
      />
    );
  }),
);
Label.displayName = "Label";

export { Label };