Wrapper component for form items. It is advised to use this component to wrap every other component contained in this library. The Form component comes with a button that does validation of FormItems when clicked. The default validation for each FormItem is based on the value of its keyboardType prop.
A function used to add custom validation to a FormItem. The function returns an object of the shape {status: boolean, message: string}. status is true when the validation passes and false when it fails. message is the underneath text to be shown when validation fails.
() => {status: boolean, message: string}
no
asterik
Whether or not to add an asterik to label
boolean
no
children
A ReactElement to render on the left part of the TextInput. Usually an icon
ReactElement
no
floatingLabel
Whether or not the label should float
boolean
no
textArea
Whether or not the input should be a textArea
boolean
no
showErrorIcon
Whether or not to show an icon when an error occurs
boolean
no
errorBorderColor
Set the color of the border when an error occurs
string
no
showIcon
Icon to be rendered when secureTextEntry is true and you want password to be visible
JSX.Element
no
hideIcon
Icon to be rendered when secureTextEntry is true and you want password to be hidden
import{Modal}from'react-native-form-component';return(<ModalshowisRequired><Viewstyle={{flex: 1,alignItems: 'center',justifyContent: 'center'}}><Text>I am inside a modal!</Text></View></Modal>);