import {CircularProgress, createStyles, Theme, WithStyles, withStyles, WithTheme} from "@material-ui/core";
import React from "react";

const styles = (theme: Theme) =>
    createStyles({
        root: {
            display: 'flex',
            '& > * + *': {
                marginLeft: theme.spacing(2),
            }
        }
    });


type Props = {} & WithStyles<typeof styles> & WithTheme

class Loader extends React.Component<Props> {
    render() {
        return <div className={this.props.classes.root}>
            <CircularProgress color="secondary"/>
        </div>
    }
}


export default withStyles(styles, {withTheme: true})(Loader);