[Paper] Overriding the Paper component in a Menu doesn't work as in v4
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
when using the following theme overrides:
const theme = createTheme({
components: {
MuiMenu: {
styleOverrides: {
paper: { borderRadius: 4 }
}
},
MuiPaper: {
styleOverrides: {
rounded: { borderRadius: 30 }
}
}
}
})
the paper used for menu shows up with border-radius=30px.
Expected behavior 🤔
I would expect that paper used in the context of a menu item be displayed with border-radius=4px (this worked as expected in MUI 4), because it seems more specific. Unless I’m wrong, in which case I wonder how could I remove the “rounded” class from the paper in a context of a menu using global theme.
Steps to reproduce 🕹
https://codesandbox.io/s/mui-theme-override-bug-66q5r
Context 🔦
This caused most menus of my application looked rounded after v4 -> v5 migration.
Your environment 🌎
Latest available mui/emotion packages - see sandbox
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Material-UI React: Global theme override for Paper component
I use many instances of the Paper component. I want to apply margins and padding to all them at once, without manually repeating...
Read more >Paper API - Material UI - MUI
API reference docs for the React Paper component. ... The name MuiPaper can be used when providing default props or style overrides in...
Read more >4 Ways to Override Material UI Styles | by John Au-Yeung
The StyleProvider let us override the styles of the child components of it. Cons. The JSS integration doesn't seem to be working and...
Read more >Learn how to use parent pages in InDesign - Adobe Support
Deselect Allow Parent Item Overrides On Selection on the Pages panel menu. Parent items that do not allow overrides have no frame edge...
Read more >Global Styling with Material-UI Theme Overrides and Props
While this works, these modifications won't apply anywhere else in the app where we use the Material-UI Button component. We could make a...
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
Hello, any update on this? Thx!
I think I’m gonna take this issue.