import * as React from 'react'; import { Text } from 'react-native'; import type { FieldRoot } from '../root/FieldRoot'; import type { ZestUIComponentProps } from '../../types'; /** * An error message shown when the field's control fails validation. * Renders a ``, or nothing when the field is valid. * * With no children, it renders the first message `validate` returned. `match` * forces it to always render (e.g. for a static hint). */ export declare function FieldError(componentProps: FieldError.Props): React.ReactElement> | null; export interface FieldErrorState extends FieldRoot.State { /** * Every message the field's `validate` returned, in order. Empty when the * field is valid. `children` defaults to the first of them. */ errors: string[]; } export interface FieldErrorProps extends Omit, 'children'> { /** * Force the message to render regardless of validity (e.g. a persistent hint). */ match?: true | undefined; children?: React.ReactNode; } export declare namespace FieldError { type State = FieldErrorState; type Props = FieldErrorProps; } //# sourceMappingURL=FieldError.d.ts.map