[Drawer] variant="permanent" elevation forced to 0
See original GitHub issueJust transferred over our drawer component to material-ui v1 and am having trouble getting the drawer to have a shadow using the “elevation” property. Is it possible to get a shadow with a drawer easily? Should the “elevation” property lead to a shadow?
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Current Behavior
Tuning the elevation of the drawer (as documented here doesn’t seem to affect the elevation of the drawer.
Steps to Reproduce (for bugs)
sample code (using Typescript) Full code: https://github.com/bayesimpact/encompass/pull/666
let drawers = {
'/analytics': AnalyticsDrawer,
'/datasets': DatasetsDrawer,
'/add-data': AddDatasetDrawer
}
export let LeftPane = withStore('route')(({ store }) =>
<React.Fragment>
{map(drawers, (Component, route) =>
<Drawer className='LeftPaneContent' elevation={100} key={route} open={route === store.get('route')}>
<Component />
</Drawer>
)}
</React.Fragment>
)
LeftPane.displayName = 'LeftPane'
Context
Interested in having a shadow on this drawer component
Your Environment
Using Typescript.
Tech | Version |
---|---|
Material-UI | 1.0.0-beta.38 |
React | ^16.1.1 |
browser | |
etc |
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
[Drawer] variant="permanent" elevation forced to 0 #10975
Just transferred over our drawer component to material-ui v1 and am having trouble getting the drawer to have a shadow using the "elevation" ......
Read more >Can the Drawer be permanent and lay over the content?
If you set the content's styling like this, it's position will not be effected by the drawer's state as you set its position...
Read more >React Drawer component - Material UI - MUI
Responsive drawer You can use the temporary variant to display a drawer for small screens and permanent for a drawer for wider screens....
Read more >Material UI Course #4 | Drawer - YouTube
Yo in this video we'll learn how to setup and use the Drawer component in Material UI. hope ya enjoy :DChapters: 0 :00...
Read more >React MUI Drawer API - GeeksforGeeks
elevation : It gives the elevation of the drawer or the height to which the drawer is elevated. The default value is 16....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can work around the issue with
https://codesandbox.io/s/permanent-drawer-elevation-not-visible-forked-wqhdk?file=/demo.js:1660-1767
We could still move forward with https://github.com/mui-org/material-ui/issues/10975#issuecomment-379847645, but it might not be important enough to justify spending time on it.
@akegan It might also be because your elevation is out of range (> 24). You should see a warning in the console.