Skip to content

Commit

Permalink
Create proper MUI theme wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Aug 19, 2020
1 parent d7e66f6 commit f78669f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { createMuiTheme } from '@material-ui/core/styles'

/**
* Returns custom MUI Theme.
* @example
* import webqueue2Theme from "./theme";
* const theme = webqueue2Theme(darkMode);
* @param {boolean} [darkMode=false] Whether theme should be dark or not.
* @returns {Theme} MUI Theme.
*/
export default function theme(darkMode=false){
return (
createMuiTheme({
"palette": {
"type": darkMode ? "dark" : "light",
}
})
);
}

0 comments on commit f78669f

Please sign in to comment.