I'm trying to build a responsive side drawer with MUI's Drawer component in React. I'm using MUI version 4.12.1.
On the mui.com example they use the sx prop and pass in an object with display set to some different screen-width dependant values.
However, when I use this code in an App.js file:
<Drawer
variant="permanent"
sx={{
display: { xs: 'none', sm: 'none' },
}}
open
>
Hello There
</Drawer>
The drawer still shows up. It also shows up when I simply set display: 'none'
Why is this? How can I actually create a drawer like this with something like sx={{ display: { xs: 'none', sm: 'block' } }} that hides the drawer at smaller screen sizes?