Untitled
unknown
plain_text
a year ago
3.2 kB
4
Indexable
import React, { useState } from 'react';
import { View, Text, TextInput, TouchableOpacity, Image, StyleSheet } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
export default function LoginScreen() {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
return (
<View style={styles.container}>
<TouchableOpacity style={styles.backButton}>
<Ionicons name="chevron-back" size={24} color="black" />
</TouchableOpacity>
<TextInput
style={styles.input}
placeholder="Email Address"
value={email}
onChangeText={setEmail}
keyboardType="email-address"
autoCapitalize="none"
/>
<TextInput
style={styles.input}
placeholder="Password"
value={password}
onChangeText={setPassword}
secureTextEntry
/>
<TouchableOpacity style={styles.loginButton} disabled={email === '' || password === ''}>
<Text style={styles.loginButtonText}>Login</Text>
</TouchableOpacity>
<View style={styles.linkContainer}>
<Text style={styles.linkText}>Email Sign Up</Text>
<Text style={styles.linkText}>Find Your Email</Text>
<Text style={styles.linkText}>Forgot Password</Text>
</View>
<TouchableOpacity style={styles.socialButton}>
<Image source={{ uri: '' }} style={styles.socialIcon} />
<Text style={styles.socialButtonText}>Log in with Google</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.socialButton}>
<Image source={{ uri: '' }} style={styles.socialIcon} />
<Text style={styles.socialButtonText}>Sign in with Facebook</Text>
</TouchableOpacity>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
padding: 16,
},
backButton: {
position: 'absolute',
top: 50,
left: 16,
},
logo: {
width: 60,
height: 60,
marginBottom: 16,
},
title: {
fontSize: 24,
fontWeight: 'bold',
color: '#FF3366',
},
subtitle: {
fontSize: 14,
color: '#FF3366',
marginBottom: 32,
},
input: {
width: '100%',
height: 40,
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 8,
paddingHorizontal: 10,
marginBottom: 16,
},
loginButton: {
width: '100%',
backgroundColor: '#ccc',
padding: 12,
borderRadius: 8,
alignItems: 'center',
marginBottom: 16,
},
loginButtonText: {
color: '#fff',
fontWeight: 'bold',
},
linkContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
width: '100%',
marginBottom: 16,
},
linkText: {
color: '#0000EE',
fontSize: 12,
},
socialButton: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#f0f0f0',
width: '100%',
padding: 12,
borderRadius: 8,
marginBottom: 12,
},
socialIcon: {
width: 20,
height: 20,
marginRight: 8,
},
socialButtonText: {
fontSize: 14,
},
});
Editor is loading...
Leave a Comment