This repository was archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathStatusBar.js
More file actions
73 lines (58 loc) · 1.56 KB
/
StatusBar.js
File metadata and controls
73 lines (58 loc) · 1.56 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
/**
* https://github.com/facebook/react-native/blob/master/Libraries/Components/StatusBar/StatusBar.js
*/
import PropTypes from 'prop-types';
import ColorPropType from '../propTypes/ColorPropType';
import createReactClass from 'create-react-class';
let _backgroundColor = '';
let _barStyle = {};
let _hidden = false;
let _networkActivityIndicatorVisible = false;
let _translucent = false;
const StatusBar = createReactClass({
propTypes: {
animated: PropTypes.bool,
barStyle: PropTypes.oneOf(['default', 'light-content']),
backgroundColor: ColorPropType,
hidden: PropTypes.bool,
networkActivityIndicatorVisible: PropTypes.bool,
showHideTransition: PropTypes.oneOf(['fade', 'slide']),
translucent: PropTypes.bool
},
statics: {
setBackgroundColor(backgroundColor, animated) {
_backgroundColor = backgroundColor;
},
setBarStyle(barStyle, animated) {
_barStyle = barStyle;
},
setHidden(hidden, animated) {
_hidden = hidden;
},
setNetworkActivityIndicatorVisible(visible) {
_networkActivityIndicatorVisible = visible;
},
setTranslucent(translucent) {
_translucent = translucent;
},
__getBackgroundColor() {
return _backgroundColor;
},
__getBarStyle() {
return _barStyle;
},
__getHidden() {
return _hidden;
},
__getNetworkActivityIndicatorVisible() {
return _networkActivityIndicatorVisible;
},
__getTranslucent() {
return _translucent;
}
},
render() {
return null;
}
});
module.exports = StatusBar;