unbrake-frontend/src/testModule/ProgressBar.jsx
import React from "react";
import LinearProgress from "@material-ui/core/LinearProgress";
import { Grid } from "@material-ui/core";
const heigthProgress = (value, classes) => {
return (
<div>
<div>
<LinearProgress
className={classes.progressHeight}
variant="determinate"
value={value}
/>
</div>
</div>
);
};
const allPower = (powerStates, classes) => {
const render = powerStates.map(value => {
return (
<Grid
container
item
justify="center"
xs={4}
className={classes.gridAllPower}
>
{heigthProgress(value.value, classes)}
<spam>{value.name}</spam>
</Grid>
);
});
return render;
};
export default allPower;