import { ComponentProps, ElementType, LegacyRef } from 'react'; import { InjectedFieldProps } from './InjectedFieldProps'; import { NormalizationFunction } from '../Normalization/NormalizationFunction'; import { ValidationFunction } from '../Validation/ValidationFunction'; export declare type RenderComponent = Partial> extends Partial> ? TRenderComponent : never; export declare type RenderComponentProps = Partial> extends Partial> ? ComponentProps : never; /** A specific Field instance to be rendered by the given TRenderComponent or by whatever default is reasonable */ export declare type FieldProps = { /** Name of the field. Used on submission. */ name: TProp; /** Component to be rendered. Usually this is a type of input group e.g. `` */ Component: RenderComponent; /** Id of the field. */ id?: string; /** Whether the field should be disabled. */ disabled?: boolean; /** Client side validation functions */ validate?: ValidationFunction | ValidationFunction[]; /** Function to modify the field value without making the form dirty. (e.g. phone number) */ normalize?: NormalizationFunction; } & Omit, keyof InjectedFieldProps>; /** * Renders whatever Component is passed - injecting the formik values needed to finish wiring up that individual field. * Should no Component be used then the default will be provided by the default lookup based on typeof(TForm[TProp]) */ declare function Field({ name, Component, id, disabled, validate, normalize, ...rest }: FieldProps, ref: LegacyRef): JSX.Element; declare const _default: typeof Field; export default _default;