How to display Material UI drawer with top margin

Viewed 2594

I am trying to implement Material UI drawer with some top margin instead of starting from very top of the page, but its not happening, i have tried applying marginTop but its not happening. here is the codeSandBox link Drawer.

How to apply top margin?

1 Answers

Set the marginTop to drawerPaper instead

const useStyles = makeStyles({
  drawerPaper: {
    marginTop: "50px"
  }
});
const classes = useStyles();

<Drawer
  classes={{
    paper: classes.drawerPaper
  }}
>
  {sideList("left")}
</Drawer>
Related