import { CircularProgress, Stack } from '@mui/material';
import React from 'react';

type Props = {
    size?: number | string;
    p?: number;
    color?: string;
};

const Loader = ({ size, p, color }: Props) => {
    return (
        <Stack direction={'row'} alignItems={'center'} justifyContent={'center'} p={p}>
            <CircularProgress size={size} {...(color ? { sx: { color } } : {})} />
        </Stack>
    );
};

export default Loader;
