Skip to content

Instantly share code, notes, and snippets.

@swahaniroy
Created December 9, 2021 11:47
Show Gist options
  • Save swahaniroy/b584c9658515e4ce6859ec52a17c15f0 to your computer and use it in GitHub Desktop.
Save swahaniroy/b584c9658515e4ce6859ec52a17c15f0 to your computer and use it in GitHub Desktop.
User SignUp
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