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.

Loader.tsx 982B

1234567891011121314151617181920212223242526272829303132333435
  1. import Box from '@mui/material/Box';
  2. import CircularProgress from '@mui/material/CircularProgress';
  3. const Loader = ({ loading }) => {
  4. return (
  5. loading && (
  6. <Box
  7. sx={{
  8. display: 'flex',
  9. zIndex: 99,
  10. height: '100vh',
  11. width: '100vw',
  12. justifyContent: 'center',
  13. alignItems: 'center',
  14. position: 'fixed',
  15. top: 0,
  16. left: 0,
  17. }}
  18. >
  19. <Box
  20. sx={{
  21. position: 'absolute',
  22. top: '48%',
  23. left: '48%',
  24. marginX: 'auto',
  25. }}
  26. >
  27. <CircularProgress color="inherit" size={60} thickness={4} />
  28. </Box>
  29. </Box>
  30. )
  31. );
  32. };
  33. export default Loader;