-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSignupScreen.tsx
80 lines (76 loc) · 2.05 KB
/
SignupScreen.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React, { useState } from 'react';
import type { PropsWithChildren } from 'react';
import { Button, View, Text, StyleSheet, TextInput, Alert, Image, ScrollView } from 'react-native';
type SectionProps = PropsWithChildren<{
title: string;
}>;
export default function App() {
const [username, setName] = useState('UserName: ');
const [password, setWord] = useState('Password: ');
return (
<ScrollView contentContainerStyle={styles.container}>
<Text style={styles.title}>Sign-up Sheet</Text>
<Image
source={require('./images/depositphotos_136992572-stock-illustration-application-form-icon.jpg')}
style ={styles.image}
/>
<Text>Enter Email:</Text>
<TextInput
style={styles.input}
placeholder='Email'
onChangeText={(val) => setName(val)}
/>
<Text>Enter Password:</Text>
<TextInput
style={styles.input}
placeholder='Password'
onChangeText={(val) => setWord(val)}
secureTextEntry={true} // Password input will appear as *****
/>
<Text>Confirm Password:</Text>
<TextInput
style={styles.input}
placeholder='Confirm Password'
onChangeText={(val) => setWord(val)}
secureTextEntry={true} // Password input will appear as *****
/>
<Button
title="SignUp"
onPress={() => Alert.alert('You have reached the signup page')}
/>
</ScrollView>
);
}
const styles = StyleSheet.create({
title: {
fontSize: 32,
fontWeight: 'bold',
marginBottom: 5,
},
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: 20,
paddingTop: 60,
width: '100%'
},
input: {
borderWidth: 1,
borderColor: '#FFF',
padding: 8,
margin: 10,
width: 200
},
image: {
width: 500,
height: 300,
marginBottom: 10
},
buttonContainer: {
flexDirection: 'row', // Arrange children horizontally
justifyContent: 'space-between', // Add space between children
width: '50%',
paddingHorizontal: 20,
},
});