-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace MUI with ui-core components - loading spinner (TECH-324) (…
…#814) Replaces the MUI loading spinner with the equivalent component from ui-core. https://jira.dhis2.org/browse/TECH-324 Also removed the duplicate LoadingMask file.
- Loading branch information
1 parent
3240092
commit 8eeb16a
Showing
5 changed files
with
20 additions
and
61 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,13 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { withStyles } from '@material-ui/core/styles' | ||
import CircularProgress from '@material-ui/core/CircularProgress' | ||
import styles from './styles/LoadingMask.module.css' | ||
import { CircularLoader } from '@dhis2/ui-core' | ||
|
||
const styles = theme => ({ | ||
progress: { | ||
margin: theme.spacing.unit * 2, | ||
maxWidth: 200, | ||
textAlign: 'center', | ||
alignSelf: 'center', | ||
}, | ||
outer: { | ||
display: 'flex', | ||
justifyContent: 'center', | ||
height: '100%', | ||
}, | ||
}) | ||
|
||
function CircularIndeterminate(props) { | ||
const { classes } = props | ||
function LoadingMask() { | ||
return ( | ||
<div className={classes.outer}> | ||
<CircularProgress className={classes.progress} /> | ||
<div className={styles.outer}> | ||
<CircularLoader className={styles.progress} /> | ||
</div> | ||
) | ||
} | ||
|
||
CircularIndeterminate.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
} | ||
|
||
export default withStyles(styles)(CircularIndeterminate) | ||
export default LoadingMask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.progress { | ||
margin: var(--spacers-dp12); | ||
max-width: 200; | ||
text-align: center; | ||
align-self: center; | ||
} | ||
|
||
.outer { | ||
display: flex; | ||
justify-content: center; | ||
height: 100%; | ||
} |