-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathApproveSwapModal.tsx
More file actions
119 lines (113 loc) · 2.82 KB
/
ApproveSwapModal.tsx
File metadata and controls
119 lines (113 loc) · 2.82 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import { Modal, StyleSheet, Text, View, Image, TouchableOpacity } from 'react-native';
import { InterRegular, InterSemiBold } from '../utils/webFonts';
import { Colors } from '../utils/colors';
import { modalStyles } from './shared';
import { CloseIcon, ApproveTokenImg } from '../assets';
interface AproveSwapModalProps {
openModal: boolean;
setOpenModal: any;
}
const ApproveSwapModal = ({ openModal, setOpenModal }: AproveSwapModalProps) => {
return (
<View style={styles.centeredView}>
<Modal animationType="slide" transparent={true} visible={openModal}>
<View style={styles.centeredView}>
<View style={styles.modalView}>
<View style={modalStyles.modalCloseIconWrapper}>
<TouchableOpacity
style={modalStyles.modalCloseIcon}
onPress={() => {
setOpenModal(false);
}}>
<Image source={CloseIcon} style={styles.closeIcon} />
</TouchableOpacity>
</View>
<Text style={styles.title}>APPROVE TOKEN SWAP</Text>
<Text style={styles.paragraph}>
To approve the exchange from your donation currency to this GoodCollective's currency, sign with your
wallet.
</Text>
<Image source={ApproveTokenImg} alt="woman" style={styles.image} />
</View>
</View>
</Modal>
</View>
);
};
const styles = StyleSheet.create({
centeredView: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
marginTop: 22,
},
modalView: {
margin: 20,
backgroundColor: Colors.blue[100],
borderRadius: 20,
paddingTop: 24,
paddingHorizontal: 24,
paddingBottom: 40,
gap: 24,
alignItems: 'center',
shadowColor: Colors.black,
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 4,
elevation: 5,
},
title: {
fontSize: 30,
textAlign: 'center',
marginHorizontal: 0,
...InterSemiBold,
},
paragraph: {
...InterRegular,
fontSize: 18,
textAlign: 'center',
width: '100%',
lineHeight: 27,
},
image: {
alignSelf: 'center',
width: 295,
height: 224,
},
closeIcon: {
width: 24,
height: 24,
alignSelf: 'flex-end',
},
button: {
backgroundColor: Colors.orange[100],
width: '100%',
borderRadius: 30,
paddingTop: 12,
paddingRight: 22,
paddingBottom: 12,
paddingLeft: 20,
gap: 8,
alignContent: 'center',
},
buttonText: {
...InterSemiBold,
fontSize: 18,
textAlign: 'center',
alignSelf: 'center',
color: Colors.orange[300],
},
textStyle: {
color: 'white',
fontWeight: 'bold',
textAlign: 'center',
},
modalText: {
marginBottom: 15,
textAlign: 'center',
},
});
export default ApproveSwapModal;