You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
As of now, I have creates a Switch in my App, this Switch is used to switch the theme. The theme seems to change when the button is clicked once but stops working after that.
Expected Behavior 🤔
Keep switching every time the theme is toggled.
Steps to Reproduce 🕹
Steps:
Create 2 themes (darkTheme, lightTheme) using createMuiTheme
create a darkMode state which stores boolean value depicting the current theme mode
create a toggle theme to switch darkMode
Create a Switch using MUI and then using that switch to toggleTheme
Add a ThemeProvider in the App.js file that contains all the other components like this <ThemeProvider theme={darkMode ? darkTheme : lightTheme}>
Context 🔦
I am trying to make a dark mode feature to my website to make it more attractive and fun to use.
Your Environment 🌎
`npx @material-ui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @material-ui/envinfo` goes here.
Please provide a minimal reproduction test case. This would help a lot 👷 .
A live example would be perfect. This codesandbox.io templatemay be a good starting point. Thank you!
Current Behavior 😯
As of now, I have creates a Switch in my App, this Switch is used to switch the theme. The theme seems to change when the button is clicked once but stops working after that.
Expected Behavior 🤔
Keep switching every time the theme is toggled.
Steps to Reproduce 🕹
Steps:
Context 🔦
I am trying to make a dark mode feature to my website to make it more attractive and fun to use.
Your Environment 🌎
`npx @material-ui/envinfo`
System:
OS: macOS 11.1
Binaries:
Node: 12.16.2 - ~/.nvm/versions/node/v12.16.2/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v12.16.2/bin/npm
Browsers:
Chrome: 89.0.4389.82
Edge: Not Found
Firefox: Not Found
Safari: 14.0.2
npmPackages:
@material-ui/core: ^4.11.3 => 4.11.3
@material-ui/lab: ^4.0.0-alpha.57 => 4.0.0-alpha.57
@material-ui/styles: 4.11.3
@material-ui/system: 4.11.3
@material-ui/types: 5.1.0
@material-ui/utils: 4.11.2
@types/react: 17.0.2
react: ^17.0.1 => 17.0.1
react-dom: ^17.0.1 => 17.0.1
The text was updated successfully, but these errors were encountered: