import React from 'react';
import Styled from 'styled-components/native';
import { ActivityIndicator } from 'react-native';

const LoadingView = Styled.View`
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: black;
    justify-content: center;
    align-items: center;
    opacity: 0.7;
`;

export default Loading = ({style, color = "white"}) => {
    return (<LoadingView style={style}><ActivityIndicator size="large" color={color} /></LoadingView>);
};