add updated funding summary card

This commit is contained in:
Barry Gitarts 2018-12-19 15:54:12 -05:00
parent ce51770d44
commit fbe5d6b194
1 changed files with 31 additions and 18 deletions

View File

@ -34,6 +34,10 @@ const styles = {
linearBarColorPrimary: { linearBarColorPrimary: {
backgroundColor: '#00695c', backgroundColor: '#00695c',
}, },
titleText: {
textAlign: 'center',
paddingTop: '2rem'
}
} }
const getNet = (deposits, withdraws) => Number(deposits) - Number(withdraws) const getNet = (deposits, withdraws) => Number(deposits) - Number(withdraws)
@ -55,30 +59,39 @@ function SimpleCard(props) {
const [name, amounts] = token const [name, amounts] = token
const { deposits, withdraws } = amounts const { deposits, withdraws } = amounts
return ( return (
<Card key={name} className={classes.fundingSummaries}> <Card key={name}>
<Typography variant="h5" component="h2"> <Typography variant="h5" className={classes.titleText}>
{name} {name}
</Typography> </Typography>
<CardContent> <CardContent className={classes.fundingSummaries}>
<Typography key={name + 'withdraw'} className={classes.pos} color="textSecondary"> <Typography variant="h3" >
Funded: {deposits} {deposits}
</Typography> </Typography>
<Typography key={name + 'deposit'} className={classes.pos} color="textSecondary"> <Typography variant="h6" key={name + 'withdraw'} className={classes.pos} color="textSecondary">
Withdrawn: {withdraws} Funded
</Typography> </Typography>
<Typography key={name + 'total'} className={classes.pos} color="textSecondary"> <Typography variant="h3">
Net: {Number(deposits) - Number(withdraws)} {withdraws}
</Typography>
<Typography variant="h6" key={name + 'deposit'} className={classes.pos} color="textSecondary">
Withdrawn
</Typography>
<Typography variant="h3">
{Number(deposits) - Number(withdraws)}
</Typography>
<Typography variant="h6" key={name + 'total'} className={classes.pos} color="textSecondary">
Net Remaining
</Typography> </Typography>
<LinearProgress
classes={{
colorPrimary: classes.linearColorPrimary,
barColorPrimary: classes.linearBarColorPrimary,
}}
color="primary"
variant="buffer"
value={getValue(deposits, withdraws)}
valueBuffer={100} />
</CardContent> </CardContent>
<LinearProgress
classes={{
colorPrimary: classes.linearColorPrimary,
barColorPrimary: classes.linearBarColorPrimary,
}}
color="primary"
variant="buffer"
value={getValue(deposits, withdraws)}
valueBuffer={100} />
</Card> </Card>
) )
})} })}