Dark theme does not work in electron
See original GitHub issueI am building a electron-react app and am using material-ui (latest v1.0) with success. The controls all seem to display fine - as far as I can see. I use TypeScript and vscode on Windows 10.
I use this code in the assumption it will select the dark theme for the material-ui:
const appTheme = createMuiTheme({
palette: {
type: "dark", // does not work??
}
});
and have my app react components wrapped with the MuiThemeProvider:
<MuiThemeProvider theme={appTheme}>
<App />
</MuiThemeProvider>
How I understood it, this should be enough to have theme-support.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
I expect to select the dark theme with this code.
Current Behavior
No reported errors (as far as I can see) and the light theme (default) is used.
Steps to Reproduce (for bugs)
I don’t think codesandbox runs electron…?
- Use in electron is a valid use-case (is it not?).
- Brings to light a bug or omission.
- Would help me tremendously with my project 😉
Context
Making an electron desktop app where I would like to (re)use the material-ui react components.
Your Environment
Running vscode on Windows 10
dependencies: “express”: “^4.16.2”, “material-ui”: “^1.0.0-beta.25”, “material-ui-icons”: “^1.0.0-beta.17”, “morgan”: “^1.9.0”, “node-hid”: “^0.5.7”, “prop-types”: “^15.6.0”, “react”: “^16.2.0”, “react-dom”: “^16.2.0”, “react-redux”: “^5.0.6”, “react-swipeable-views”: “^0.12.12”, “redux”: “^3.7.2”, “typed-rest-client”: “^0.15.1”, “typeface-roboto”: “0.0.45”
dev-dependencies: “@types/prop-types”: “^15.5.2”, “@types/express”: “^4.0.39”, “@types/jest”: “^21.1.8”, “@types/morgan”: “^1.7.35”, “@types/node”: “^8.0.55”, “@types/node-hid”: “^0.5.2”, “@types/react”: “^16.0.31”, “@types/react-dom”: “^16.0.3”, “@types/react-redux”: “^5.0.14”, “@types/react-swipeable-views”: “^0.12.0”, “electron”: “^1.7.9”, “electron-rebuild”: “^1.6.0”, “jest”: “^22.0.3”, “ts-jest”: “^22.0.0”, “tslint”: “^5.8.0”, “tslint-react”: “^3.2.0”, “typescript”: “^2.6.2”
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I’ll try to make an isolated project that demonstrates the problem.
I have called it Reboot after all.