import type { ReactNode, Ref } from "react"; import { faCircleQuestion } from "@fortawesome/pro-duotone-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Label as AriaLabel, type LabelProps as AriaLabelProps } from "react-aria-components"; import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip"; import { cx } from "@/utils/cx"; interface LabelProps extends AriaLabelProps { children: ReactNode; isRequired?: boolean; tooltip?: string; tooltipDescription?: string; ref?: Ref; } export const Label = ({ isRequired, tooltip, tooltipDescription, className, ...props }: LabelProps) => { return ( // or // data-label="true" {...props} className={cx("flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary", className)} > {props.children} * {tooltip && ( )} ); }; Label.displayName = "Label";