-
Notifications
You must be signed in to change notification settings - Fork 1
/
styles.js
146 lines (133 loc) · 3.32 KB
/
styles.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import { StyleSheet, StatusBar, Platform } from "react-native";
const baseColors = {
textColor: "#000",
primaryColor: "#a845ff",
backgroundColor: "#fff",
};
const baseStyles = {
separator: {
marginVertical: 8,
margin: 0,
marginTop: 15,
marginBottom: 15,
borderBottomColor: "#737373",
borderBottomWidth: StyleSheet.hairlineWidth,
},
fab: {
position: "absolute",
backgroundColor: "#a845ff",
margin: 16,
right: 5,
bottom: 5,
borderRadius: 20,
},
fields: {
inputStyle: {
flexGrow: 1,
marginBottom: 10,
height: 40,
},
},
dropdown: {
containerView: {
height: 40,
margin: 10,
},
inputStyle: {
flexGrow: 1,
color: baseColors.textColor,
borderColor: baseColors.textColor,
margin: 5,
height: 40,
borderWidth: 1,
borderRadius: 2,
paddingHorizontal: 5,
},
},
container: {
base: {
// base container for top-level screens
flex: 1,
marginTop: 10,
// shadowOffset: { width: 0, height: 0 },
paddingHorizontal: 10,
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
},
pane: {
// container for tab panes
flex: 1,
paddingTop: 15,
paddingHorizontal: 16,
},
center: {
// center pane for login screen
flex: 1,
paddingHorizontal: 10,
justifyContent: "center",
alignContent: "center",
},
},
button: {
iconRight: {
flexDirection: "row-reverse",
},
// listButton: {
// marginBottom: 10,
// },
// bigButton: {
// paddingVertical: 8,
// },
},
text: {
redCenter: {
color: "red",
textAlign: "center",
},
},
appBar: {
// elevated appbar is good for now
// backgroundColor: "#a845ff",
},
modal: {
background: {
flex: 1,
alignItems: "center",
flexDirection: "column",
justifyContent: "space-around",
backgroundColor: "#22222240",
},
activityIndicatorWrapper: {
backgroundColor: "#FFFFFF",
height: 100,
width: 100,
borderRadius: 10,
display: "flex",
alignItems: "center",
justifyContent: "space-around",
},
activityIndicator: {
alignItems: "center",
height: 80,
},
},
};
const darkStyles = {
separator: {
marginVertical: 8,
borderBottomColor: "#737373",
borderBottomWidth: StyleSheet.hairlineWidth,
},
};
export default (colorScheme) => {
if (colorScheme === "dark") {
const mergedStyles = {};
for (const styleName in baseStyles) {
mergedStyles[styleName] = {
...baseStyles[styleName],
...darkStyles[styleName],
};
}
return StyleSheet.create(mergedStyles);
}
return StyleSheet.create(baseStyles);
};