-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDatePickerStyle.js
117 lines (113 loc) · 2.51 KB
/
DatePickerStyle.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
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
import { StyleSheet, Dimensions, Platform } from "react-native";
export const isIphoneX = () => {
const { height, width } = Dimensions.get("window");
return (
Platform.OS === "ios" &&
!Platform.isPad &&
!Platform.isTVOS &&
(height === 812 || width === 812)
);
};
const BORDER_RADIUS = 13;
const BACKGROUND_COLOR = "white";
const BORDER_COLOR = "#d5d5d5";
const TITLE_FONT_SIZE = 13;
const TITLE_COLOR = "#8f8f8f";
const BUTTON_FONT_WEIGHT = "normal";
const BUTTON_FONT_COLOR = "#007ff9";
const BUTTON_FONT_SIZE = 20;
let style = StyleSheet.create({
contentContainer: {
justifyContent: "flex-end",
margin: 10
},
datepickerContainer: {
backgroundColor: BACKGROUND_COLOR,
borderRadius: BORDER_RADIUS,
marginBottom: 8,
overflow: "hidden"
},
titleContainer: {
borderBottomColor: BORDER_COLOR,
borderBottomWidth: StyleSheet.hairlineWidth,
padding: 14,
backgroundColor: "transparent"
},
title: {
textAlign: "center",
alignSelf : 'center',
color: TITLE_COLOR,
fontSize: TITLE_FONT_SIZE
},
confirmButton: {
borderColor: BORDER_COLOR,
borderTopWidth: StyleSheet.hairlineWidth,
backgroundColor: "transparent",
height: 57,
justifyContent: "center"
},
confirmText: {
textAlign: "center",
color: BUTTON_FONT_COLOR,
fontSize: BUTTON_FONT_SIZE,
fontWeight: BUTTON_FONT_WEIGHT,
backgroundColor: "transparent"
},
cancelButton: {
backgroundColor: BACKGROUND_COLOR,
borderRadius: BORDER_RADIUS,
height: 57,
marginBottom: isIphoneX() ? 20 : 0,
justifyContent: "center"
},
cancelText: {
padding: 10,
textAlign: "center",
color: BUTTON_FONT_COLOR,
fontSize: BUTTON_FONT_SIZE,
fontWeight: "600",
backgroundColor: "transparent"
},
dateTouch: {
width: '100%',
height : '100%'
},
dateTouchBody: {
flexDirection: 'row',
height: '100%',
alignItems: 'center',
justifyContent: 'center'
},
dateIcon: {
width: 25,
height: 25,
marginLeft: 5,
marginRight: 5,
},
dateInput: {
flex: 1,
height: '100%',
// borderWidth: 1,
// borderColor: '#aaa',
alignItems: 'center',
justifyContent: 'center',
// backgroundColor: 'red'
},
dateText: {
color: '#333',
alignSelf: 'center',
},
placeholderText: {
color: '#c9c9c9',
alignSelf: 'center',
},
datePicker: {
marginTop: 42,
borderTopColor: '#ccc',
borderTopWidth: 1
},
disabled: {
backgroundColor: '#eee'
}
});
export default style;