I'm trying to create a container to a react app that has highcharts chart and 3 textboxes. Currently, I'm struggling to get the three textboxes to rearrange under the chart component when resizing screen or switching to a mobile view. How can I achieve wanted functionality? I'm using react with hooks, typescript and material UI.
This is how it looks at the moment:
<Container className={classes.boxTest2} maxWidth="xl">
<Grid container spacing={1}>
<Chart />
<Grid item xs={3} md={2} lg={2}>
<Paper className={classes.paper}>
some info
<Typography className={classes.tempStyle} variant="h5">
{round}°C
</Typography>
</Paper>
</Grid>
<Grid item xs={3} md={2} lg={2}>
<Paper className={classes.paper}>
more info
</Paper>
</Grid>
<Grid item xs={3} md={2} lg={2}>
<Paper className={classes.paper}>
even more info
</Paper>
</Grid>
</Grid>
</Container>
Here is the styling:
boxTest2: {
display: "flex"
},
tempStyle: {
color: "red",
marginTop: "20px",
textAlign: "center"
},
paper: {
height: 200,
flex: 1,
display: "flex",
alignItems: "center",
justifyContent: "center",
elevation: 8,
maxWidth: "150px"
},