I am using material ui Grid component to create a responsive grid layout. And I want to align the content inside grid depending on the screen size - alignt left for xs and align right for md. How do I do that?
I used xs and md breakpoints to divide the grid depending on screen size. Used material-ui-grid doc. The documentation also mentions a property called align-items-xs-flex-start. So I gave align-items-xs-flex-start and align-items-md-flex-end as props to Grid component to see if the content is aligned to left in xs and right in md. But it didn't work.
Some example code.
<Grid>
<Grid xs={12} md={7}>
Hi there!
</Grid>
<Grid xs={12} md={5}>
John Doe!
</Grid>
</Grid>
On a medium sized screen, I want John Doe to be aligned right. On a small sized screen, I want John Doe to come to next line and align to left. When I tried using align-items-xs-flex-start and align-items-md-flex-end, it's still aligned to left in both cases.