Theme not Changing in `AppBar of material-UI?

I am trying to change the theme of a material-UI AppBar using states but the theme is not changing but the icons are.

Here the link of the code: https://codesandbox.io/s/relaxed-bird-n30bg?file=/src/App.js

Add Comment
1 Answer(s)

🙂

In App.js, there is a typo — palatte should be palette

const theme = createMuiTheme({     palette: { //<---here       type: themeMode,       primary: {         main: themeMode === "light" ? "#3f51b5" : "#333333"       }     }   }); 

I have checked & with the the typo fix, everything is working

Answered on July 16, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.