import { clsx } from 'clsx'; import { ComponentPropsWithRef } from 'react'; import { buildTypographyOverrides, getResponsiveBase, mapResponsiveSizeToTypography, type Responsive, } from '../../styles'; import { labelRecipe, LabelVariants } from './label.css'; export type LabelProps = ComponentPropsWithRef<'label'> & { required?: boolean; } & Omit & { size?: Responsive>; }; export function Label({ className, disabled, error, size = 'md', ...props }: LabelProps) { const baseSize = getResponsiveBase(size) ?? 'md'; const typographySize = mapResponsiveSizeToTypography(size); const typographyOverrides = buildTypographyOverrides({ variant: 'label', size: typographySize, }); return (