mirror of
https://github.com/lemeow125/Reactnative-notesapp.git
synced 2025-06-28 16:35:44 +08:00
Login page and Register Page
This commit is contained in:
parent
3428093f0c
commit
0318f4eb53
3 changed files with 95 additions and 20 deletions
|
@ -5,36 +5,39 @@ import Background from '../../Components/Background/Background';
|
|||
import { SafeAreaView} from "react-native";
|
||||
import { StatusBar } from "expo-status-bar";
|
||||
import { useState } from "react";
|
||||
import {Button,TouchableOpacity,} from "react-native";
|
||||
import {TouchableOpacity,} from "react-native";
|
||||
|
||||
|
||||
|
||||
export default function Login() {
|
||||
const [email, setEmail] = useState("");
|
||||
const [username, setUsername] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
|
||||
|
||||
return (
|
||||
<Background>
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>LOG IN</Text>
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}></Text>
|
||||
<SafeAreaView>
|
||||
<View style={styles.container}>
|
||||
<Text style ={styles.loginlabel}>Login to Clip Notes</Text>
|
||||
<StatusBar style="auto" />
|
||||
<View style={styles.inputView}>
|
||||
<TextInput
|
||||
style={styles.TextInput}
|
||||
placeholder="Email."
|
||||
placeholderTextColor="#003f5c"
|
||||
onChangeText={(email) => setEmail(email)}
|
||||
placeholder="Username"
|
||||
placeholderTextColor="white"
|
||||
onChangeText={setUsername}
|
||||
value={username}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View style={styles.inputView}>
|
||||
<TextInput
|
||||
style={styles.TextInput}
|
||||
placeholder="Password."
|
||||
placeholderTextColor="#003f5c"
|
||||
placeholder="Password"
|
||||
placeholderTextColor="white"
|
||||
secureTextEntry={true}
|
||||
onChangeText={(password) => setPassword(password)}
|
||||
onChangeText={setPassword}
|
||||
value={password}
|
||||
/>
|
||||
</View>
|
||||
|
||||
|
@ -44,9 +47,12 @@ export default function Login() {
|
|||
<TouchableOpacity style={styles.loginBtn}>
|
||||
<Text style={styles.loginText}>LOGIN</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={styles.registerbtn}>
|
||||
<Text style={styles.registertext}>REGISTER</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
</Background>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,56 @@
|
|||
import * as React from 'react';
|
||||
import {View, Text} from 'react-native';
|
||||
import {View, Text, TextInput} from 'react-native';
|
||||
import styles from '../../styles';
|
||||
import Background from '../../Components/Background/Background';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { useState } from "react";
|
||||
import {TouchableOpacity} from "react-native";
|
||||
|
||||
export default function Register() {
|
||||
const [username, setUsername] = useState("");
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
|
||||
return (
|
||||
<Background>
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Register</Text>
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}></Text>
|
||||
<SafeAreaView>
|
||||
<View style={styles.container}>
|
||||
<Text style ={styles.loginlabel}>Create an Account</Text>
|
||||
<View style={styles.inputView}>
|
||||
<TextInput
|
||||
style={styles.TextInput}
|
||||
placeholder="Email"
|
||||
placeholderTextColor="white"
|
||||
onChangeText={setEmail}
|
||||
value={email}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.inputView}>
|
||||
<TextInput
|
||||
style={styles.TextInput}
|
||||
placeholder="Username"
|
||||
placeholderTextColor="white"
|
||||
onChangeText={setUsername}
|
||||
value={username}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.inputView}>
|
||||
<TextInput
|
||||
style={styles.TextInput}
|
||||
placeholder="Password"
|
||||
placeholderTextColor="white"
|
||||
secureTextEntry={true}
|
||||
onChangeText={setPassword}
|
||||
value={password}
|
||||
/>
|
||||
</View>
|
||||
<TouchableOpacity style={styles.registerbtn}>
|
||||
<Text style={styles.registertext}>REGISTER</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
</Background>
|
||||
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue