Nested theme not working
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
I have a main Theme
and a secondary Theme
that I need to use it only on few pages, so I followed the nested themes pattern as described in the docs, wrapping only few components into the secondary theme, but only the primary theme is applied
Expected Behavior 🤔
I expect the secondary theme to be applied where necessary
Steps to Reproduce 🕹
https://codesandbox.io/s/friendly-shaw-kpcfe?file=/src/Demo.js
Steps:
- open the live example
- the theme is light instead of dark
Context 🔦
I’d like my main app to use a light/standard theme, while the landing page should always use a dark theme, I use react-router for the routing
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.11.0 |
React | v16.13.1 |
Browser | Chrome 86 |
TypeScript | v3.9 |
etc. |
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Nested theme not working #23086 - mui/material-ui - GitHub
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >MUI v5 Nested ThemeProvider Problem - StackBlitz
const theme = createTheme({. palette: {. primary: {. main: '#FF0000',. },. },. }); const theme2 = createTheme({. direction: 'rtl',. palette: {. primary: {....
Read more >Issues- grid theme with nested repeats Connect v 3.13
This limits how repeats are able to be used within the survey. I have several surveys that incorporate nested group and repeats. Is...
Read more >Breaking changes in v5, part one: styles and themes - MUI
Although your style overrides defined in the theme may partially work, there is an important difference regarding how the nested elements are styled....
Read more >Material Design 2 in Compose - Jetpack - Android Developers
The first screenshot shows an app that does not configure MaterialTheme ... This approach makes it possible to easily support dark theme and...
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
https://codesandbox.io/s/goofy-star-xrjc9?file=/src/Demo.js:567-814
thank you @oliviertassinari , I managed to have a nested theme!