import type { ReactNode } from 'react'; import React from 'react'; import type { IconOrContent } from '../../util/utility-types'; import type { Status } from '../../util/variant-types'; export type FieldNoteProps = { /** * Child node(s) that can be nested inside component */ children?: ReactNode; /** * CSS class names that can be appended to the component. */ className?: string; /** * HTML id for the component */ id?: string; /** * Toggles disabled styling of the field note. */ disabled?: boolean; /** * Leading slot for the note. Takes an EDS icon name, or any content to render in its * place at 16px. * * Only set this alongside a `status`. A note with no status has nothing for an icon to * report, and the icon reads as a status the note does not have; EDS warns in that case. * * `status` supplies this slot's default, and the icon it picks comes from * `IconProvider`, so an app changes every status icon in one place. An explicit value * here wins over that default for this one note, and the status treatment (color, and * the announced "error"/"warning") still applies. * * Custom content is rendered as-is and carries its own accessible treatment, so it does * not receive the status title an icon name would. */ icon?: IconOrContent; /** * Status for the field state * * **Default is `"default"`**. */ status?: 'default' | Extract; }; /** * ## Usage * * `FieldNote` is used to add additional context to the attached input control (e.g., `InputField`, * `TextareaField`, `Select`, `Combobox`, etc.). `FieldNote` should not be used in isolation, but * can be used when building a custom input control. * * | Type/Use | Description | Example | * |----------|-------------|---------| * | Default | Neutral helper text sitting below the control. | Format hints. Examples of valid input. | * | Warning | `status="warning"` adds a warning icon and treatment. | Input that is accepted but likely not what the user meant. | * | Critical | `status="critical"` adds an error icon and treatment. | Validation failures that block submission. | * * When building a custom control, give the note an `id` and add that `id` to the control's * `aria-describedby` so the note is announced with the control. The EDS controls that render a * `FieldNote` for you already wire this up. * * For guidance on what to put in a note, see the do's and don'ts on the control itself (for * example, `InputField`). */ export declare const FieldNote: { ({ children, className, id, disabled, icon, status, ...other }: FieldNoteProps): React.JSX.Element; displayName: string; };