Last active
July 4, 2018 12:24
-
-
Save msert29/c7ed52e7f2f36c4e94ebfcd65ccaa851 to your computer and use it in GitHub Desktop.
This file contains 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
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
display: "flex", | |
flexDirection: "column", | |
justifyContent: "center", | |
alignItems: "center", | |
maxHeight: 400 | |
}, | |
inputStyle : { | |
minHeight: 80, | |
width: width, | |
backgroundColor: "white", | |
margin: 1, | |
padding: 20, | |
alignSelf: "center", | |
borderColor: "white", | |
borderWidth: 1 | |
} | |
}); | |
render() { | |
return ( | |
<View style={styles.container}> | |
<TextInput | |
style={styles.inputStyle} | |
ref={addressEntry => (this._addressEntry = addressEntry)} | |
placeholder="Address" | |
maxLength={60} | |
onChangeText={streetName => | |
this.validateAndSetAttribute("streetName", streetName)} | |
/> | |
<TextInput | |
style={styles.inputStyle} | |
ref={cityEntry => (this._cityEntry = cityEntry)} | |
placeholder="City" | |
maxLength={58} | |
onChangeText={city => this.validateAndSetAttribute("city", city)} | |
/> | |
<TextInput | |
style={styles.inputStyle} | |
ref={postcodeEntry => (this._postcodeEntry = postcodeEntry)} | |
placeholder="Postcode" | |
maxLength={8} | |
onChangeText={postcode => | |
this.validateAndSetAttribute("postcode", postcode)} | |
/> | |
</View> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment