Created
December 9, 2021 11:47
-
-
Save swahaniroy/b584c9658515e4ce6859ec52a17c15f0 to your computer and use it in GitHub Desktop.
User SignUp
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 {KeyboardAvoidingView, Platform, View} from 'react-native'; | |
import {Input, Button} from 'react-native-elements'; | |
import {styles} from '../../styles'; | |
export default function SignUp() { | |
const [data, setData] = useState({ | |
name: '', | |
email: '', | |
password: '', | |
}); | |
const handleSignUp = () => {}; | |
return ( | |
<KeyboardAvoidingView | |
style={styles.container} | |
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}> | |
<View style={styles.body}> | |
<Input | |
placeholder="name" | |
leftIcon={{type: 'font-awesome', name: 'user'}} | |
onChangeText={value => setData({...data, name: value})} | |
/> | |
<Input | |
placeholder="email" | |
leftIcon={{type: 'font-awesome', name: 'envelope'}} | |
onChangeText={value => setData({...data, email: value})} | |
/> | |
<Input | |
placeholder="password" | |
leftIcon={{type: 'font-awesome', name: 'lock'}} | |
onChangeText={value => setData({...data, password: value})} | |
secureTextEntry={true} | |
/> | |
<Button title="Sign Up" loading={false} onPress={handleSignUp} /> | |
</View> | |
</KeyboardAvoidingView> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment