UNPKG

nextuiq

Version:

NextUIQ is a modern, lightweight, and developer-friendly UI component library for React and Next.js. Built with TypeScript and Tailwind CSS, it offers customizable, accessible, and performance-optimized components with built-in dark mode, theme customizat

37 lines (34 loc) 940 B
import { j as jsxRuntimeExports } from './index46.mjs'; import { forwardRef } from 'react'; import { twMerge } from 'tailwind-merge'; const LabelComponent = forwardRef(({ htmlFor, children, className, required = false, disabled = false, "aria-label": ariaLabel, ...props }, ref) => { return /* @__PURE__ */ jsxRuntimeExports.jsxs( "label", { ref, htmlFor, className: twMerge( "mb-1.5 block text-sm font-medium text-[oklch(var(--theme-foreground))]", disabled && "opacity-60 cursor-not-allowed", className ), "aria-label": ariaLabel, ...props, children: [ children, required && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[oklch(var(--theme-destructive))] ml-1", "aria-hidden": "true", children: "*" }) ] } ); }); LabelComponent.displayName = "Label"; const Label = LabelComponent; export { Label };