import React from 'react'; import { Field, FastField, FieldArray } from 'formik'; import { InputProps, FormGroupProps } from '@bootstrap-styled/v4'; import AddField from './AddField'; import Select from './Select'; import InputMask from './InputMask'; import Autocomplete from './Autocomplete'; declare type PassInputProps = Omit & Pick; declare type FieldComponents = typeof Field | typeof FastField | typeof FieldArray | typeof AddField | typeof Select | typeof InputMask | typeof Autocomplete; declare type AssertFieldProps = T extends FieldComponents ? React.ComponentProps : { children?: any; }; declare type LabelOptsProps = { htmlFor: string; isRequired?: boolean; }; declare type LabelRenderProp = string | ((opts: LabelOptsProps) => React.ReactNode); export interface TextFieldProps extends PassInputProps, AssertFieldProps { name: string; label: LabelRenderProp; type?: InputProps['type'] | 'autocomplete' | 'inputmask'; fieldComp?: FieldComponents; required?: boolean; disabled?: boolean; hiddenLabel?: boolean; error?: FormGroupProps['color'] | boolean; } /** * This component manages, either all form input field with a label * @param {Object} Props to configure the text input field * @return {React.ReactElement} */ declare const TextField: React.FC; export default TextField;