-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.ts
129 lines (115 loc) · 3.13 KB
/
env.ts
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
120
121
122
123
124
125
126
127
128
129
import { StyleSheet } from 'react-native';
import {getPartOfDay, getSeason} from "./helper";
export enum Screens {
ActivityList = "ActivityList",
ActivityDetails = "ActivityDetails",
}
export enum Tabs {
About = "About",
Home = "Home",
}
const checkBoxChecked = {
backgroundColor: '#E3F2FD',
borderColor: '#82B1FF',
marginTop: 9,
borderWidth: 1,
borderRadius: 30,
};
const checkBoxCheckedText = {
color: '#1976D2',
fontSize: 15,
};
const checkBoxUnchecked = {
backgroundColor: '#FFFFFF',
borderColor: '#BDBDBD',
marginTop: 9,
borderWidth: 1,
borderRadius: 30
};
const checkBoxUncheckedText = {
color: '#757575',
fontSize: 15,
};
const buttonAsCheckBox = {
paddingRight: 20,
paddingLeft: 20,
marginTop: 0,
borderWidth: 1,
};
const buttonAsCheckBoxText = {
fontSize: 14,
};
export const styles = StyleSheet.create({
container: {
flex: 1
},
scrollView: {
marginHorizontal: 20,
},
formLabel: {
paddingLeft: 10,
marginTop: 23,
color: 'rgb(134, 147, 158)',
fontSize: 16,
fontWeight: 'bold'
},
checkBoxChecked: checkBoxChecked,
checkBoxCheckedText: checkBoxCheckedText,
checkBoxUnchecked: checkBoxUnchecked,
checkBoxUncheckedText: checkBoxUncheckedText,
filtersContainer: {
flex: 1,
flexDirection: 'row',
backgroundColor: '#FFFFFF',
borderBottomWidth: 1,
borderBottomColor: '#CCCCCC',
paddingRight: 7,
paddingLeft: 7,
paddingTop: 10,
paddingBottom: 12,
},
filterButton: {...checkBoxUnchecked, borderWidth: 1, paddingTop: 9, paddingRight: 10, paddingLeft: 10, marginTop: 0},
buttonChecked: {...checkBoxChecked, ...buttonAsCheckBox},
buttonCheckedText: {...checkBoxCheckedText, ...buttonAsCheckBoxText},
buttonUnchecked: {...checkBoxUnchecked, ...buttonAsCheckBox},
buttonUncheckedText: {...checkBoxUncheckedText, ...buttonAsCheckBoxText},
aboutImage: {
marginBottom: 5,
},
aboutLabel: {
marginTop: 47,
color: '#757575',
},
aboutTitle: {
fontSize: 19,
fontWeight: 'bold',
},
aboutURLButton: {
marginTop: 5,
borderRadius: 5,
width: 150,
height: 40,
}
});
export enum FilterName {
AvailableNow = 'AvailableNow',
PriceUnder = 'PriceUnder',
AllSeasons = 'AllSeasons',
AllWeek = 'AllWeek',
AllDay = 'AllDay',
}
export const MIN_TITLE_LEN = 3;
export const MIN_PRICE = 1;
export const DEFAULT_PRICE = 2;
export const MAX_PRICE = 4;
export const defaultFilterState = {
// [FilterName.AvailableNow as string]: false,
[FilterName.PriceUnder as string]: MAX_PRICE,
[FilterName.AllSeasons as string]: true,
[FilterName.AllWeek as string]: true,
[FilterName.AllDay as string]: true,
};
const date = new Date();
export const dayOfWeek = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'][ date.getDay() ];
export const partOfDay = getPartOfDay(date.getHours());
export const currentSeason = getSeason(date.getMonth() + 1);