-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourseSelectionScreen.tsx
More file actions
90 lines (83 loc) · 2.35 KB
/
Copy pathCourseSelectionScreen.tsx
File metadata and controls
90 lines (83 loc) · 2.35 KB
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
81
82
83
84
85
86
87
88
89
90
import React from 'react';
import { View, Text, Button, StyleSheet, TouchableOpacity } from 'react-native';
const CourseSelectionScreen = ({ route, navigation }) => {
const { dishName, description, cost } = route.params; // Get details from navigation params
return (
<View style={styles.container}>
<Text style={styles.headerText}>Select a Course for {dishName}</Text>
<Text style={styles.descriptionText}>{description}</Text>
{/* Example of course options with clear labels */}
<TouchableOpacity
style={styles.button}
onPress={() => navigation.navigate('Summary', {
dishName,
description,
course: 'Starter',
cost,
})}
>
<Text style={styles.buttonText}>Select Starter</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={() => navigation.navigate('Summary', {
dishName,
description,
course: 'Main Course',
cost,
})}
>
<Text style={styles.buttonText}>Select Main Course</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.button}
onPress={() => navigation.navigate('Summary', {
dishName,
description,
course: 'Dessert',
cost,
})}
>
<Text style={styles.buttonText}>Select Dessert</Text>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#FFDAB9', // Peach background color
justifyContent: 'center',
alignItems: 'center',
padding: 15,
},
headerText: {
fontSize: 24,
color: 'black',
marginBottom: 30,
textAlign: 'center',
},
descriptionText: {
fontSize: 20,
color: 'black',
marginBottom: 30,
textAlign: 'center',
},
button: {
backgroundColor: 'gold',
padding: 15,
borderRadius: 8,
marginVertical: 10,
width: '80%', // Makes buttons wider
alignItems: 'center',
elevation: 3, // Adds shadow for Android
shadowColor: '#000', // Shadow properties for iOS
shadowOpacity: 0.2,
shadowRadius: 3,
},
buttonText: {
fontSize: 18,
color: 'black', // Button text color
},
});
export default CourseSelectionScreen;