-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWelcomeScreen.js
56 lines (52 loc) · 1.32 KB
/
WelcomeScreen.js
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
import React from 'react';
import { View, StyleSheet, Text, Image } from 'react-native';
import AppButton from '../components/AppButton';
import Colors from '../utils/colors';
import useStatusBar from '../hooks/useStatusBar';
export default function WelcomeScreen({ navigation }) {
useStatusBar('light-content');
return (
<View style={styles.container}>
<View style={styles.logoContainer}>
<Image source={require('../assets/flame.png')} style={styles.logo} />
<Text style={styles.subtitle}>Todo App</Text>
</View>
<View style={styles.buttonContainer}>
<AppButton title="Login" onPress={() => navigation.navigate('Login')} />
<AppButton
title="Register"
color="secondary"
onPress={() => navigation.navigate('Register')}
/>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'flex-end',
alignItems: 'center',
backgroundColor: Colors.mediumGrey
},
logoContainer: {
position: 'absolute',
top: 60,
alignItems: 'center'
},
logo: {
width: 125,
height: 125
},
subtitle: {
fontSize: 24,
fontWeight: '600',
paddingVertical: 20,
color: Colors.primary
},
buttonContainer: {
padding: 20,
paddingBottom: 60,
width: '100%'
}
});