import React from 'react'; import { ITestableProps, SizeType } from '../../../types'; interface IBaseTextInputProps extends ITestableProps, Omit, 'onChange'> { name?: string; value?: string; placeholder?: string; defaultValue?: string; tabIndex?: number; disabled?: boolean; autoFocus?: boolean; readonly?: boolean; isError?: boolean; maxLength?: number; required?: boolean; type?: 'text' | 'search' | string; size?: SizeType; } export type TextInputPropsType = ({ inputProps?: Omit, 'onChange' | 'onBlur' | 'value' | 'defaultValue' | 'placeholder' | 'tabIndex' | 'disabled' | 'name' | 'autoFocus' | 'maxLength' | 'required'>; onBlur?: (e: React.FocusEvent) => void; multiline?: true; onChange?: (value: string, e: React.ChangeEvent) => void; min?: number; max?: number; prefix?: React.ReactNode | React.ReactNode[]; suffix?: React.ReactNode | React.ReactNode[]; } & IBaseTextInputProps) | ({ inputProps?: Omit, 'onChange' | 'onBlur' | 'value' | 'defaultValue' | 'placeholder' | 'tabIndex' | 'disabled' | 'name' | 'autoFocus' | 'maxLength' | 'required'>; onBlur?: (e: React.FocusEvent) => void; multiline: false; type?: undefined; onChange?: (value: string, e: React.ChangeEvent) => void; } & IBaseTextInputProps); export {};