Refactor LinearProgress

This commit is contained in:
Leonardo Murça 2022-07-01 17:33:04 -03:00
parent 661653f561
commit 3387d94ea4
2 changed files with 16 additions and 10 deletions

View file

@ -1,6 +1,10 @@
import { Box, LinearProgress } from '@mui/material';
import styles from './styles';
function LoadingIndicator({ isLoading }) {
const { box, linearProgress } = styles;
if (isLoading) {
return (
<Box sx={box}>
@ -10,14 +14,4 @@ function LoadingIndicator({ isLoading }) {
}
}
const box = {
width: '100%',
position: 'absolute',
top: 0,
};
const linearProgress = {
height: '7px',
};
export default LoadingIndicator;

View file

@ -0,0 +1,12 @@
const box = {
width: '100%',
position: 'absolute',
top: 0,
};
const linearProgress = {
height: '7px',
};
const styles = { box, linearProgress };
export default styles;