/
ProgressHUD.js
49 lines (43 loc) · 878 Bytes
/
ProgressHUD.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
'use strict';
var React = require('react-native');
var {
View,
Text,
Component,
ActivityIndicatorIOS,
} = React;
class ProgressHUD extends Component {
constructor(props) {
super(props);
}
render() {
var {width, height, isVisible} = this.props;
if( isVisible ) {
return(
<View
style={{
flex: 1,
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
width: width,
height: height,
position: 'absolute',
top: 0,
left: 0,
backgroundColor: 'rgba(0, 0, 0, 0.5)'
}}>
<ActivityIndicatorIOS
animating={true}
color={'#fff'}
size={'large'}
style={{margin: 15}} />
<Text style={{color:'#fff'}}>Please wait...</Text>
</View>
);
} else {
return(<View></View>);
}
}
};
module.exports = ProgressHUD;