-1

The above code is only a example. My original code it's working perfectly, but I would like write better.

Example of code:

<Grid container justifyContent="space-between">
  <Box display = "flex">
     <Typography> Hello World</Typography>
  </Box>
 <OthersComponents/>
 ...
</Grid>
NearHuscarl
  • 66,950
  • 18
  • 261
  • 230

1 Answers1

0

You should have a Grid container that has children Grid items.

<Grid container>
  <Grid item>
     <Typography>Item 1</Typography>
  </Grid>
  <Grid item>
     <Typography>Item 2</Typography>
  </Grid>
</Grid>

Check out the docs for other props: https://mui.com/api/grid/

Steve
  • 4,372
  • 26
  • 37