import { type ComponentPropsWithoutRef } from 'react'; import { type HelpMessageRecipeVariant } from '../../styled-system/recipes'; import { type TypographyProps } from '../Typography'; /** * Props for the HelpMessage component */ export type HelpMessageProps = { /** * The intent of the message. Controls the icon and color. * - `neutral`: informational (IconInfo) * - `error`: validation or system error (IconError). Sets `role="alert"` for screen readers. * - `caution`: warning or advisory (IconCaution). No ARIA role is set by default — add `role="status"` or `aria-live="polite"` when rendering dynamically. * - `success`: confirmation or positive feedback (IconApproval) * * @default 'neutral' */ messageType?: HelpMessageRecipeVariant['messageType']; /** * Whether to display the icon next to the message. * Defaults to `false` for `neutral` (for backward compatibility) and `true` for all other types. */ showIcon?: boolean; /** * The alignment of the message. * * @default 'left' */ messageAlign?: 'left' | 'center'; /** * The content of the message. * * @default null */ children?: TypographyProps['children']; } & ComponentPropsWithoutRef<'div'>;