Created
August 4, 2020 19:40
-
-
Save popeating/3b3e1523e05f1a3ebff21a8b094d25bf 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
import React, { useState } from 'react'; | |
import { | |
View, | |
StyleSheet, | |
TouchableWithoutFeedback, | |
Keyboard, | |
} from 'react-native'; | |
import { TextInput, Button } from 'react-native-paper'; | |
import loc from '../utils/localization'; | |
const SignUpScreen = ({ navigation }) => { | |
const [name, setName] = useState(''); | |
const [email, setEmail] = useState(''); | |
const [password, setPassword] = useState(''); | |
return ( | |
<TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}> | |
<View style={styles.container}> | |
<View style={styles.inputContainer}> | |
<TextInput | |
placeholder="Email address" | |
onChangeText={(name) => setName(name)} | |
value={name} | |
label={loc.t('nome')} | |
mode="outlined" | |
/> | |
</View> | |
<View style={styles.inputContainer}> | |
<TextInput | |
placeholder="Email address" | |
onChangeText={(email) => setEmail(email)} | |
value={email} | |
label="Email" | |
keyboardType={'email-address'} | |
mode="outlined" | |
/> | |
</View> | |
<View style={styles.inputContainer}> | |
<TextInput | |
placeholder="Password" | |
onChangeText={(password) => setPassword(password)} | |
value={password} | |
secureTextEntry={true} | |
label="Password" | |
mode="outlined" | |
/> | |
</View> | |
<Button mode="contained" icon="login"> | |
{loc.t('signupButton')} | |
</Button> | |
</View> | |
</TouchableWithoutFeedback> | |
); | |
}; | |
const styles = StyleSheet.create({ | |
inputContainer: { | |
width: '80%', | |
marginBottom: 20, | |
}, | |
container: { | |
flex: 1, | |
//backgroundColor: '#fff', | |
alignItems: 'center', | |
justifyContent: 'center', | |
}, | |
}); | |
export default SignUpScreen; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment