I'm trying to put two centered paragraphs into a column <Grid>, separated by a vertical <Divider>. I added the divider as a Grid item, but the divider appears justified to the right instead of the center, between the two paragraphs. Here is my code:
<Grid item container direction="row" spacing={{ xs: 1, md: 3 }}>
<Grid item xs={5}>
<Typography variant="body2" align="center">
Paragraph A text
</Typography>
</Grid>
<Grid item xs={2}>
<Divider orientation="vertical" />
</Grid>
<Grid item xs={5}>
<Typography variant="body2" align="center">
Paragraph B text
</Typography>
</Grid>
</Grid>
With this code, the vertical divider is justified to the right. There is no change if I add justifyContent="center" to the container Grid, I assume because the divider is a right border. I think I need to add padding-right somehow, but calculated so that it is responsive to different screen widths. Any help would be much appreciated!
