-
Notifications
You must be signed in to change notification settings - Fork 0
/
HomePage.js
61 lines (58 loc) · 2.45 KB
/
HomePage.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
57
58
59
60
import React, { Component } from 'react';
import { View, Text, Button, StyleSheet, TouchableOpacity} from 'react-native';
type Props = {};
export default class Home extends Component<Props> {
render() {
return (
<View styles={styles.container}>
<View style={{width: '100%', height: 200, backgroundColor: '#08561a', paddingTop:50}}>
<Text style={styles.heading}>Vegetarian & Vegan Restaurant Finder!</Text>
</View>
<View style={{width: '100%', height: 100, backgroundColor: '#14812d', paddingTop:30}}>
<TouchableOpacity color="#84d295" onPress={() => this.props.navigation.navigate('View')}>
<Text style={styles.touchOpacity}>Find Restaurants ➜</Text>
</TouchableOpacity>
</View>
<View style={{width: '100%', height: 100, backgroundColor: '#23a842', paddingTop:30}}>
<TouchableOpacity color="#228b22" onPress={() => this.props.navigation.navigate('Add')}>
<Text style={styles.touchOpacity}>Add Restaurants ➜</Text>
</TouchableOpacity>
</View>
<View style={{width: '100%', height: 100, backgroundColor: '#35c657', paddingTop:30}}>
<TouchableOpacity color="#228b22" onPress={() => this.props.navigation.navigate('Update')}>
<Text style={styles.touchOpacity}>Update Restaurants ➜</Text>
</TouchableOpacity>
</View>
<View style={{width: '100%', height: 100, backgroundColor: '#58ec7a', paddingTop:30}}>
<TouchableOpacity color="#228b22" onPress={() => this.props.navigation.navigate('Delete')}>
<Text style={styles.touchOpacity}>Delete Restaurants ➜</Text>
</TouchableOpacity>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection:'column',
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF",
},
heading: {
fontSize: 36,
color:'#ffffff',
justifyContent:'center',
fontWeight: 'bold',
textAlign: "center",
},
touchOpacity: {
fontSize:24,
color:'#ffffff',
width: '100%',
justifyContent:'center',
textAlign:'center',
alignItems: 'center'
}
});