import React, { useState } from "react"; import { StyleSheet, SafeAreaView, Text, TextInput, View } from "react-native"; import { Button} from 'native-base'; import { useTheme } from '@react-navigation/native'; function Email({route, navigation}) { const { colors } = useTheme(); const [email, setEmail] = useState(''); //Go to Username page. function handleNext() { navigation.navigate("Username", { firstName: route.params.firstName, lastName: route.params.lastName, email: email }) } return ( <SafeAreaView style={ [styles.screen, {flexDirection:"column"}] }> <Text style={ [styles.title, {color: colors.text}] }>Enter your email:</Text> <Text style={ [styles.subtitle, {color: colors.text}] }>This is how your password will be reset.</Text> <TextInput placeholder = "pete@purdue.edu" style={ [styles.input, {color: colors.text}] } onChangeText={(email) => setEmail(email)} /> <View style={{flexDirection: "row"}}> <Button style={ styles.nextButton } onPress={handleNext}> <Text style={ styles.nextText } >Next</Text> </Button> </View> </SafeAreaView> ); } const styles = StyleSheet.create({ screen:{ marginTop: "20%", paddingLeft: "5%", paddingRight: "5%", paddingBottom: "30%", marginLeft: "10%", marginRight: "10%" }, title: { fontSize: 25, fontWeight: "bold", marginTop: "10%", paddingBottom: "20%", textAlign:"left" }, subtitle: { fontSize: 16, textAlign:"left", fontWeight: "bold", color: '#5c5a55' }, input: { width: "100%", height: 40, borderBottomWidth: 1 }, nextButton: { width: '100%', justifyContent: 'center', backgroundColor: "#d4911c", borderRadius: 10, alignItems: "center", marginBottom: 10, marginTop: 50 }, nextText: { fontSize: 16, fontWeight: "bold", color: "white" }, }); export default Email;