I set a container width limit of 600px on my app, but this caused the drawer to display incorrectly. Instead of rendering next to the page content, it appears inside the app bar.
When the screen width exceeds 600px (the designated limit), the drawer ends up within the app bar (incorrect picture). However, when the screen is smaller than 600px, the drawer displays correctly (correct picture).
I am using material-ui components, with the app bar positioned absolutely due to scroll events implementation. To center the app bar, I use the following code snippet:
maxWidth: 600,
[theme.breakpoints.up("sm")]: {
left: "50%",
transform: "translate(-50%, 0)"
}
For the example code in codesandbox, visit: https://codesandbox.io/s/material-drawer-e6vrc?file=/header.js