You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
853 B
39 lines
853 B
import { FC } from 'react'; |
|
import { |
|
Box as MUIBox, |
|
BoxProps as MUIBoxProps, |
|
CircularProgress as MUICircularProgress, |
|
circularProgressClasses as muiCircularProgressClasses, |
|
} from '@mui/material'; |
|
|
|
import { TEXT } from '../lib/consts/DEFAULT_THEME'; |
|
|
|
type SpinnerProps = MUIBoxProps; |
|
|
|
const Spinner: FC<SpinnerProps> = (spinnerProps): JSX.Element => { |
|
const { sx, ...spinnerRestProps } = spinnerProps; |
|
|
|
return ( |
|
<MUIBox |
|
{...{ |
|
...spinnerRestProps, |
|
sx: { |
|
alignItems: 'center', |
|
display: 'flex', |
|
justifyContent: 'center', |
|
marginTop: '3em', |
|
|
|
[`& .${muiCircularProgressClasses.root}`]: { |
|
color: TEXT, |
|
}, |
|
|
|
...sx, |
|
}, |
|
}} |
|
> |
|
<MUICircularProgress variant="indeterminate" /> |
|
</MUIBox> |
|
); |
|
}; |
|
|
|
export default Spinner;
|
|
|