Looking to create a new MaterialUI component similar to this one: original box
Struggling with implementing it using the card component, but so far it looks like:
Here's my custom styling using makeStyles:
const useStyles = makeStyles(() => ({
cardHeader: {
color: "white",
borderRadius: "0"
},
cardDescription: {
display: "flex",
justifyContent: "center",
alignItems: "baseline",
backgroundColor: "#315059",
color: "cyan"
},
}));
const classes = useStyles();
And here's the code for my card component:
<Card style={{borderRadius: "0"}}>
<CardHeader
title="AVERAGE SPEED"
titleTypographyProps={{ align: "center" }}
subheaderTypographyProps={{ align: "center" }}
className={classes.cardHeader}
style={{backgroundColor:"#f92f3b"}}
/>
<CardContent style={{backgroundColor:"#f92f3b"}}>
<div className={classes.cardDescription}>
<Typography component="h2" variant="h3" color="cyan" >
262
</Typography>
<Typography variant="h6" color="white">
KM/H
</Typography>
</div>
</CardContent>
</Card>