import React, {FC} from 'react'; import {TextInputProps} from 'react-native'; import { Wrapper, InputWrapper, StyledTextInput, Error, Label, FlagWrapper, Flag, CountryCode, } from '@styles/components/text-input'; interface IField extends TextInputProps { label?: string; error?: string; onChangeText?: ((text: string) => void) | undefined; value?: string; showCountryFlag?: boolean; } const Field: FC = ({ label, onChangeText, value, error, showCountryFlag = true, ...rest }) => ( {!!label && } {showCountryFlag && ( +91 )} {!!error && {error}} ); export default Field;