Struggling to vertically align three items in a row using Material UI's Grid component. Despite setting "justifyContent: 'center'," it only horizontally centers the items. Here are my styles:
const styles = (theme) => ({
root: {
textAlign: "left",
margin: theme.spacing(2),
paddingBottom: theme.spacing(1),
color: theme.color.secondary,
},
cardHeader: {
paddingBottom: theme.spacing(0),
},
cardContent: {
width: "100%",
paddingBottom: theme.spacing(1),
},
rowBody: {
width: "100%",
flexWrap: "nowrap",
alignItems: "center",
justifyContent: 'center',
},
...
<CardContent className={classes.cardContent}>
<Grid container className={classes.rowBody} spacing={1}>
<Grid item>
<img height="20" src={require('../../img/apple.svg')} alt="" />
</Grid>
<Grid item>
{title}
</Grid>
<Grid item className={classes.infoIcon}>
<InfoIcon />
</Grid>
</Grid>
Output shown below.
https://i.sstatic.net/TXTCt.png
Looking for a way to vertically align items without affecting horizontal alignment.