ActiveIcon loading option

master
Tudor Stanciu 2021-05-15 01:06:58 +03:00
parent a7e2c34dcb
commit 27588b3f06
1 changed files with 12 additions and 4 deletions

View File

@ -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" />
);
};