1.0.8 • Published 4 years ago

react-native-dialog-input v1.0.8

Weekly downloads
1,804
License
-
Repository
github
Last release
4 years ago

react-native-dialog-input

Dialog with input for React Native on iOS and Android.

Examples

React Native Dialog Input iOS React Native Dialog Input Android

Setup

npm install --save react-native-dialog-input

Usage

import DialogInput from 'react-native-dialog-input';
...
<DialogInput isDialogVisible={this.state.isDialogVisible}
            title={"DialogInput 1"}
            message={"Message for DialogInput #1"}
            hintInput ={"HINT INPUT"}
            submitInput={ (inputText) => {this.sendInput(inputText)} }
            closeDialog={ () => {this.showDialog(false)}}>
</DialogInput>
...

Properties

namedescriptiontype
isDialogVisibleCondition to show or hide the DialogInputBoolean
titleTitle to show in the DialogInputString (OPTIONAL)
messageMessage to show in the DialogInputString (OPTIONAL)
hintInputText hint to show in the TextInputString (OPTIONAL)
hintTextColorColor of the text hintString (OPTIONAL)
initValueTextInputDefault value for the TextInputString (OPTIONAL)
textInputPropsAdditional properties to add to the TextInput in the form: textInputProps={{autoCorrect:false}} Currently supports:autoCorrectautoCapitalizeclearButtonModeclearTextOnFocuskeyboardTypesecureTextEntrymaxLengthObject (OPTIONAL)
modalStyleStyles for the blocking view behind the DialogInputObject (OPTIONAL)
dialogStyleStyles for the DialogInput main viewObject (OPTIONAL)
cancelTextReplacement text for the Cancel buttonString (OPTIONAL)
submitTextReplacement text for the Submit buttonString (OPTIONAL)

Methods

namedescriptionreturns
submitInput()Event fired when the user press the SUBMIT buttonString
closeDialog()Event fired when the user press the CLOSE button-