forked from ganmor/react-native-webbrowser
-
Notifications
You must be signed in to change notification settings - Fork 4
/
styles.js
executable file
·109 lines (98 loc) · 2.42 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
import { StyleSheet, Platform } from 'react-native';
const HEADER = '#3b5998';
const BGWASH = 'rgba(255,255,255,1)';
const ELEMENT_MARGIN = 8;
const SHADOW_COLOR = '#333';
const SHADOW_OPACITY = 0.4;
const SHADOW_RADIUS = 1;
const isAndroid = function() {
return Platform.OS === 'android';
};
const isIOS = function() {
return Platform.OS === 'ios';
};
let styleobj = {
container: {
flex: 1,
backgroundColor: HEADER,
},
header: {
transform: [{'translate':[0,0,1]}], /* bring view to front */
shadowColor:SHADOW_COLOR,
shadowOpacity:SHADOW_OPACITY,
shadowRadius:SHADOW_RADIUS,
shadowOffset: { height:1, width: 0 },
},
addressBarRow: {
flexDirection: 'row',
marginTop: ELEMENT_MARGIN/2,
marginBottom: ELEMENT_MARGIN/2,
marginLeft: ELEMENT_MARGIN,
marginRight: ELEMENT_MARGIN,
},
webView: {
backgroundColor: BGWASH,
height: 350,
},
addressBarTextInput: {
backgroundColor: 'white',
borderRadius: 3,
height: isAndroid() ? 40 : 35,
paddingLeft: 10,
flex: 1,
fontSize: 14,
paddingTop: isAndroid() ? 10 : 0,
marginBottom:5
},
navButton: {
width: 20,
padding: 3,
marginRight: 3,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: BGWASH,
borderColor: 'transparent',
borderRadius: 3,
},
statusBar: {
marginLeft:ELEMENT_MARGIN,
marginRight:ELEMENT_MARGIN,
height: 35,
},
statusBarText: {
flex:1,
color: 'white',
fontSize: 14,
textAlign:'center',
},
spinner: {
width: 20,
marginRight: 6,
},
toolBar: {
shadowColor:SHADOW_COLOR,
shadowOpacity:SHADOW_OPACITY,
shadowRadius:SHADOW_RADIUS,
shadowOffset: { height:0, width: 0 },
flexDirection:'row',
justifyContent:'flex-start',
paddingTop:isAndroid() ? 5 : ELEMENT_MARGIN,
paddingBottom:isAndroid() ? 20 : ELEMENT_MARGIN
},
toolBarIcons: {
width:50,
height:40,
justifyContent:'center',
alignItems:'center',
marginRight:10,
opacity:1
}
}
if (isIOS()) {
styleobj['toolBarIcons'] = {
width:30,
height:30,
opacity: 1
};
}
export default StyleSheet.create(styleobj);