diff --git a/ui/src/App.js b/ui/src/App.js index 0dc096966..fd3812601 100644 --- a/ui/src/App.js +++ b/ui/src/App.js @@ -3,14 +3,18 @@ import React from 'react' import { Admin, Resource } from 'react-admin' import dataProvider from './dataProvider' import authProvider from './authProvider' -import { Login, Layout } from './layout' +import { Login, Layout, LightTheme } from './layout' import user from './user' import song from './song' import album from './album' import artist from './artist' +import { createMuiTheme } from '@material-ui/core/styles' + +const theme = createMuiTheme(LightTheme) const App = () => ( ({ main: { @@ -171,7 +171,7 @@ Login.propTypes = { // Because otherwise the useStyles() hook used in Login won't get // the right theme const LoginWithTheme = (props) => ( - + ) diff --git a/ui/src/layout/themes.js b/ui/src/layout/Themes.js similarity index 69% rename from ui/src/layout/themes.js rename to ui/src/layout/Themes.js index 6aa7dc808..7421a5c82 100644 --- a/ui/src/layout/themes.js +++ b/ui/src/layout/Themes.js @@ -1,10 +1,13 @@ -export const darkTheme = { +// import purple from '@material-ui/core/colors/purple' + +export const DarkTheme = { palette: { - type: 'dark' // Switching the dark mode on is a single property value change. + // secondary: purple, + type: 'dark' } } -export const lightTheme = { +export const LightTheme = { palette: { secondary: { light: '#5f5fc4', diff --git a/ui/src/layout/index.js b/ui/src/layout/index.js index ebfb0760a..fcb2b8517 100644 --- a/ui/src/layout/index.js +++ b/ui/src/layout/index.js @@ -1,4 +1,5 @@ import Login from './Login' import Layout from './Layout' +import { DarkTheme, LightTheme } from './Themes' -export { Layout, Login } +export { Layout, Login, DarkTheme, LightTheme }