Programing/React

[React] Box

mjune.kim 2023. 7. 14. 08:20

The sx prop

https://mui.com/system/getting-started/the-sx-prop/

Align Rating into the cener of box content.

<Box
   noValidate
   component="form"
   sx={{
     display: 'flex',
     flexDirection: 'column',
     m: 'auto',
     width: 'fit-content',
  }}
>
  <Rating
    name="simple-controlled"
    value={value}
    onChange={(event, newValue) => {
    setValue(newValue);
    }}
  />
</Box>