import React from 'react';
import Box from '../UI/Box/Box';
import Loader from 'react-loader-spinner';
import Text from '../UI/Text/Text';

export default ({title}) => {
  return (
    <Box dxStyle={{padding: 'var(--default_spacing)'}}>
      <Text
        text={title || 'Please Wait...'}
        textAlign={'center'}
        type={'Heading1'}/>
      <div style={{paddingLeft: 'calc(50% - 16px)', paddingTop: 'var(--default_spacing)'}}>
        <Loader color={'var(--heading_text_color)'}
                height={32}
                width={32}
                type='TailSpin'/>
      </div>
    </Box>
  );
}
