-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStats.js
60 lines (57 loc) · 1.26 KB
/
Stats.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import React from "react";
import { Card, CardContent, Typography } from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import "./Stats.css";
const useStyles = makeStyles({
root: {
background: "#ffffff",
border: 0,
borderRadius: 6,
height: 100,
width: 200,
boxShadow: " -5px 3px 82px -6px rgba( 144, 202, 249,0.);",
},
});
function Stats({
title,
cases,
total,
onClick,
active,
isGrey,
isGreen,
isRed,
}) {
const classes = useStyles();
return (
<Card
className={`statCard
${active && "statChange"}
`}
onClick={onClick}
>
<CardContent className={classes.root}>
<div
className={`
${active && "div-Change"}
`}
>
<Typography color="textSecondary" className="statTitle">
{title}
</Typography>
<h1
className={`statCases ${!isGrey && !isRed && "statGreen"}
${!isGrey && !isGreen && "statRed"}`}
style={{ font: `16px` }}
>
+{cases}
</h1>
<Typography color="textPrimary" className="statTotal">
+{total} Total
</Typography>
</div>
</CardContent>
</Card>
);
}
export default Stats;