React Native Developer

Thursday, December 31, 2020

Loder.js react native

Mr.Paresh Chavda

import React, {Component} from 'react';
import {View, Modal, StyleSheet, ActivityIndicator} from 'react-native';

export default class Loader extends Component {
 
  render() {
    const {Action} = this.props;
    return (
      <View>
        <Modal animationType={'fade'} transparent={true} visible={Action}>
          <View style={styles.Container}>
            <ActivityIndicator size="large" color="#ffffff" />
          </View>
        </Modal>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  Container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: 'rgba(0, 0, 0, 0.52)',
  },
});

No comments:

Post a Comment