diff --git a/src/components/LoadingIndicator.js b/src/components/LoadingIndicator/index.js similarity index 69% rename from src/components/LoadingIndicator.js rename to src/components/LoadingIndicator/index.js index 8d5d006..4c2c285 100644 --- a/src/components/LoadingIndicator.js +++ b/src/components/LoadingIndicator/index.js @@ -1,6 +1,10 @@ import { Box, LinearProgress } from '@mui/material'; +import styles from './styles'; + function LoadingIndicator({ isLoading }) { + const { box, linearProgress } = styles; + if (isLoading) { return ( @@ -10,14 +14,4 @@ function LoadingIndicator({ isLoading }) { } } -const box = { - width: '100%', - position: 'absolute', - top: 0, -}; - -const linearProgress = { - height: '7px', -}; - export default LoadingIndicator; diff --git a/src/components/LoadingIndicator/styles.js b/src/components/LoadingIndicator/styles.js new file mode 100644 index 0000000..2e5c5d3 --- /dev/null +++ b/src/components/LoadingIndicator/styles.js @@ -0,0 +1,12 @@ +const box = { + width: '100%', + position: 'absolute', + top: 0, +}; + +const linearProgress = { + height: '7px', +}; + +const styles = { box, linearProgress }; +export default styles;