Created
September 26, 2017 12:41
-
-
Save hanipcode/c14a67b904236f724491f2d1f8f244d7 to your computer and use it in GitHub Desktop.
Simplified AutoCompleteBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // rest of code same as before.. | |
| const AutoCompleteBox = props => ( | |
| <View style={styles.AutoCompleteBox}> | |
| <TextInput | |
| {...props} | |
| underlineColorAndroid="#FFF" | |
| style={styles.AutoCompleteInput} | |
| /> | |
| <TouchableOpacity onPress={() => props.clearInput()}> | |
| <Text style={styles.AutoCompleteClose}>X</Text> | |
| </TouchableOpacity> | |
| </View> | |
| ); | |
| AutoCompleteBox.defaultProps = { | |
| clearInput: () => console.log('Clear Input Pressed') | |
| }; | |
| export default AutoCompleteBox; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment