Skip to content

Commit 83c2c4c

Browse files
committed
Enhance key numbers section
1 parent 0a46afd commit 83c2c4c

File tree

3 files changed

+72
-9
lines changed

3 files changed

+72
-9
lines changed

src/Dashboard/KeyNumbers/KeyNumbers.js

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,75 @@
11
import React from 'react'
2+
import clsx from 'clsx'
23
import PropTypes from 'prop-types'
34
import { makeStyles } from '@material-ui/core/styles'
4-
import Paper from '@material-ui/core/Paper'
5-
import Grid from '@material-ui/core/Grid'
5+
import { Paper, Grid, Typography } from '@material-ui/core'
66

77
const KeyNumbers = props => {
88
const classes = useStyles()
99

1010
return (
1111
<>
1212
<Grid item xs={6} sm={3}>
13-
<Paper className={classes.paper}>xs=3</Paper>
13+
<Paper className={classes.paper}>
14+
Subscriptions
15+
<Grid container spacing={0}>
16+
<Grid item xs={6} md={12} lg={6}>
17+
<Typography variant="body1" className={classes.value}>
18+
139 <sup className={clsx(classes.valueChange, classes.positive)}>+5%</sup>
19+
</Typography>
20+
</Grid>
21+
<Grid item xs={6} md={12} lg={6}>
22+
-
23+
</Grid>
24+
</Grid>
25+
</Paper>
1426
</Grid>
1527
<Grid item xs={6} sm={3}>
16-
<Paper className={classes.paper}>xs=3</Paper>
28+
<Paper className={classes.paper}>
29+
Monthly Revenue
30+
<Grid container spacing={0}>
31+
<Grid item xs={6} md={12} lg={6}>
32+
<Typography variant="body1" className={classes.value}>
33+
24350${' '}
34+
<sup className={clsx(classes.valueChange, classes.positive)}>+13%</sup>
35+
</Typography>
36+
</Grid>
37+
<Grid item xs={6} md={12} lg={6}>
38+
-
39+
</Grid>
40+
</Grid>
41+
</Paper>
1742
</Grid>
1843
<Grid item xs={6} sm={3}>
19-
<Paper className={classes.paper}>xs=3</Paper>
44+
<Paper className={classes.paper}>
45+
Monthly Churn
46+
<Grid container spacing={0}>
47+
<Grid item xs={6} md={12} lg={6}>
48+
<Typography variant="body1" className={classes.value}>
49+
13 <sup className={clsx(classes.valueChange, classes.negative)}>+10%</sup>
50+
</Typography>
51+
</Grid>
52+
<Grid item xs={6} md={12} lg={6}>
53+
-
54+
</Grid>
55+
</Grid>
56+
</Paper>
2057
</Grid>
2158
<Grid item xs={6} sm={3}>
22-
<Paper className={classes.paper}>xs=3</Paper>
59+
<Paper className={classes.paper}>
60+
Total Users
61+
<Grid container spacing={0}>
62+
<Grid item xs={6} md={12} lg={6}>
63+
<Typography variant="body1" className={classes.value}>
64+
48205{' '}
65+
<sup className={clsx(classes.valueChange, classes.positive)}>+30%</sup>
66+
</Typography>
67+
</Grid>
68+
<Grid item xs={6} md={12} lg={6}>
69+
-
70+
</Grid>
71+
</Grid>
72+
</Paper>
2373
</Grid>
2474
</>
2575
)
@@ -33,8 +83,19 @@ const useStyles = makeStyles(theme => ({
3383
},
3484
paper: {
3585
padding: theme.spacing(2),
36-
textAlign: 'center',
86+
textAlign: 'left',
3787
color: theme.palette.text.secondary,
88+
height: '100%',
89+
},
90+
value: {
91+
fontWeight: 'bold',
92+
},
93+
valueChange: {},
94+
negative: {
95+
color: theme.palette.text.negative,
96+
},
97+
positive: {
98+
color: theme.palette.text.positive,
3899
},
39100
}))
40101

src/Dashboard/Subscriptions/Subscriptions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Subscriptions = props => {
3232
/>
3333
<CardContent className={classes.cardContent}>
3434
<Grid container spacing={4}>
35-
<Grid item sm={9} className={classes.chartBox}>
35+
<Grid item xs={12} sm={8} md={9} className={classes.chartBox}>
3636
<div className={classes.chartContainer}>
3737
<div className={classes.chart}>
3838
<Line
@@ -42,7 +42,7 @@ const Subscriptions = props => {
4242
</div>
4343
</div>
4444
</Grid>
45-
<Grid item sm={3} className={classes.ratingBox}>
45+
<Grid item xs={12} sm={4} md={3} className={classes.ratingBox}>
4646
{subscriptionsItems.map(({ name, ratio, value }) => (
4747
<div key={name}>
4848
<Grid container>

src/_theme/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ const baseTheme = createMuiTheme({
8484
},
8585
text: {
8686
secondary: 'rgba(102, 102, 102, 0.83)',
87+
positive: '#8cd136',
88+
negative: '#e35959',
8789
},
8890
},
8991
typography: {

0 commit comments

Comments
 (0)