// import { type ReactNode } from "react"; import { View } from "react-native"; import { Text, TextInput, type TextInputProps } from "react-native-paper"; import type { Field, FieldControlProps } from "../../common/constants"; import { fieldStyles } from "../../styles/control-styles"; import FormUtils from "../../utils/FormUtil"; // interface ColProps { // children: ReactNode; // style?: Record; // } interface Props extends FieldControlProps { field: Field; } function TextFieldControl(props: Props) { const maxLength = FormUtils.getNumberOrUndefined(props.field.meta?.validation?.max); return ( : } maxLength={maxLength} /> { props.error.hasError && ( {props.error.errorMsg} ) } ); } export default TextFieldControl;