Advertisement
iceriver102

loading

Nov 15th, 2019
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import React, {Component} from 'react';
  2. import {View, ActivityIndicator} from 'react-native';
  3.  
  4. export default class Loading extends Component {
  5. render() {
  6. if (this.props.isLoading)
  7. return (
  8. <View
  9. style={{
  10. top: 0,
  11. right: 0,
  12. bottom: 0,
  13. left: 0,
  14. flex: 1,
  15. justifyContent: 'center',
  16. alignItems: 'center',
  17. position: 'absolute',
  18. zIndex: 100,
  19. backgroundColor: '#00000080',
  20. }}>
  21. <ActivityIndicator
  22. color={this.props.color ? this.props.color : 'blue'}
  23. />
  24. </View>
  25. );
  26. return false;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement