import Block from '../../../Primitives/Block/Block' import { FOUNDATION_THEME } from '../../../../tokens' import Text from '../../../Text/Text' type InputFooterTokens = { hintText?: { fontWeight?: number | string fontSize?: number | string color?: { default?: string; disabled?: string } } errorMessage?: { fontWeight?: number | string fontSize?: number | string color?: string } } type InputFooterProps = { error?: boolean errorMessage?: string hintText?: string errorId?: string // Unique ID for error association (WCAG 3.3.1) hintId?: string // Unique ID for hint association (WCAG 3.3.2) tokens?: InputFooterTokens hintTextId?: string errorMessageId?: string } const InputFooter = ({ error, errorMessage, hintText, errorId, hintId, tokens, hintTextId, errorMessageId, }: InputFooterProps) => { return ( ((error && errorMessage) || hintText) && ( {error && errorMessage && ( {errorMessage} )} {hintText && !error && ( {hintText} )} ) ) } export default InputFooter