1
|
|
|
import React from 'react'; |
2
|
|
|
import { StyleSheet, Text, View, Pressable, Modal, TextInput} from 'react-native'; |
3
|
|
|
|
4
|
|
|
export default function HowModal({navigation, modalVisible, setModalVisible}) { |
5
|
|
|
|
6
|
|
|
return ( |
7
|
|
|
<Modal |
8
|
|
|
animationType='fade' |
9
|
|
|
transparent={true} |
10
|
|
|
visible={modalVisible} |
11
|
|
|
onRequestClose={() => { |
12
|
|
|
setModalVisible(!modalVisible); |
13
|
|
|
}} |
14
|
|
|
> |
15
|
|
|
<View style={styles.modalContainer}> |
16
|
|
|
|
17
|
|
|
<View style={[styles.messageContainer, styles.shadowProp]}> |
18
|
|
|
<Text style={styles.title}>How to drive</Text> |
19
|
|
|
|
20
|
|
|
<View style={styles.textContainer}> |
21
|
|
|
<Text style={styles.text}>1. Add balance to your wallet</Text> |
22
|
|
|
<Text style={styles.text}>2. Select a scooter on the map</Text> |
23
|
|
|
<Text style={styles.text}>3. Press 'Start Tour' to start driving</Text> |
24
|
|
|
<Text style={styles.text}>4. Press 'Stop Tour' to stop driving</Text> |
25
|
|
|
<Text style={styles.text}>P.S. Parking in certain zones can give you a discount!</Text> |
26
|
|
|
</View> |
27
|
|
|
|
28
|
|
|
|
29
|
|
|
|
30
|
|
|
|
31
|
|
|
<Pressable style={[styles.prepaidButton, {backgroundColor: 'white'}]} onPress={() => { |
32
|
|
|
setModalVisible(!modalVisible); |
33
|
|
|
}}> |
34
|
|
|
<Text style={{color: 'black'}}>OK</Text> |
35
|
|
|
</Pressable> |
36
|
|
|
|
37
|
|
|
|
38
|
|
|
</View> |
39
|
|
|
</View> |
40
|
|
|
</Modal> |
41
|
|
|
) |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
const styles = StyleSheet.create({ |
45
|
|
|
modalContainer: { |
46
|
|
|
height: '100%', |
47
|
|
|
width: '100%', |
48
|
|
|
backgroundColor: 'rgba(0, 0, 0, 0.8)', |
49
|
|
|
position:'absolute', |
50
|
|
|
alignItems: 'center' |
51
|
|
|
}, |
52
|
|
|
|
53
|
|
|
messageContainer: { |
54
|
|
|
backgroundColor: 'cornflowerblue', |
55
|
|
|
width: '90%', |
56
|
|
|
height: 350, |
57
|
|
|
marginTop: 100, |
58
|
|
|
justifyContent: 'center', |
59
|
|
|
alignItems: 'center' |
60
|
|
|
}, |
61
|
|
|
|
62
|
|
|
shadowProp: { |
63
|
|
|
elevation: 5, |
64
|
|
|
shadowColor: 'black' |
65
|
|
|
}, |
66
|
|
|
|
67
|
|
|
title: { |
68
|
|
|
fontSize: 18, |
69
|
|
|
fontWeight: '600', |
70
|
|
|
color: 'white', |
71
|
|
|
textAlign: 'left', |
72
|
|
|
width: '80%' |
73
|
|
|
}, |
74
|
|
|
|
75
|
|
|
prepaidButton: { |
76
|
|
|
backgroundColor: 'black', |
77
|
|
|
width: '90%', |
78
|
|
|
height: 50, |
79
|
|
|
borderRadius: 50, |
80
|
|
|
display: 'flex', |
81
|
|
|
justifyContent: 'center', |
82
|
|
|
alignItems: 'center', |
83
|
|
|
marginTop: 30, |
84
|
|
|
}, |
85
|
|
|
|
86
|
|
|
text: { |
87
|
|
|
textAlign: 'left', |
88
|
|
|
width: '100%', |
89
|
|
|
fontSize: 16 |
90
|
|
|
}, |
91
|
|
|
|
92
|
|
|
textContainer: { |
93
|
|
|
width: '80%', |
94
|
|
|
height: 150, |
95
|
|
|
justifyContent: 'space-evenly', |
96
|
|
|
marginTop: 10 |
97
|
|
|
} |
98
|
|
|
}) |