ActiveIcon loading option
parent
a7e2c34dcb
commit
27588b3f06
|
@ -1,17 +1,25 @@
|
|||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { CheckCircleOutlineRounded, RemoveRounded } from "@material-ui/icons";
|
||||
import { LinearProgress } from "@material-ui/core";
|
||||
import { LinearProgress, Grid } from "@material-ui/core";
|
||||
|
||||
const ActiveIcon = ({ active, loading }) => {
|
||||
if (loading && loading === true) {
|
||||
return <LinearProgress />;
|
||||
return (
|
||||
<Grid container>
|
||||
<Grid item xs={5} />
|
||||
<Grid item xs={2}>
|
||||
<LinearProgress />
|
||||
</Grid>
|
||||
<Grid item xs={5} />
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
|
||||
return active && active === true ? (
|
||||
<CheckCircleOutlineRounded color="primary" />
|
||||
<CheckCircleOutlineRounded color="primary" fontSize="small" />
|
||||
) : (
|
||||
<RemoveRounded />
|
||||
<RemoveRounded fontSize="small" />
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue