UI: Use login theme everywhere
This commit is contained in:
@@ -14,7 +14,7 @@ import LockIcon from '@material-ui/icons/Lock'
|
||||
|
||||
import { Notification, useLogin, useNotify, useTranslate } from 'react-admin'
|
||||
|
||||
import { lightTheme } from './themes'
|
||||
import { LightTheme } from './Themes'
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
main: {
|
||||
@@ -171,7 +171,7 @@ Login.propTypes = {
|
||||
// Because otherwise the useStyles() hook used in Login won't get
|
||||
// the right theme
|
||||
const LoginWithTheme = (props) => (
|
||||
<ThemeProvider theme={createMuiTheme(lightTheme)}>
|
||||
<ThemeProvider theme={createMuiTheme(LightTheme)}>
|
||||
<Login {...props} />
|
||||
</ThemeProvider>
|
||||
)
|
||||
|
||||
@@ -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',
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user