Skip to content

Commit 8b26f3a

Browse files
committed
Put the themes in their own files.
1 parent 2549eac commit 8b26f3a

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

frontend/src/components/App.jsx

+3-15
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,15 @@ import {render} from 'react-dom';
33
import ButtonAppBar from './AppBar';
44
import LeadList from './LeadList';
55
import CssBaseline from '@mui/material/CssBaseline';
6-
import {createTheme, ThemeProvider} from '@mui/material/styles';
7-
import Alert from '@mui/material/Alert';
6+
import {ThemeProvider} from '@mui/material/styles';
87
import Box from '@mui/material/Box';
98
import Grid from '@mui/material/Grid';
109
import {anonUser} from "./Authentication";
1110
import {AppContext} from "./AppContext";
1211
import Welcome from "./Welcome";
1312
import {Route, Routes, Router, BrowserRouter} from 'react-router-dom';
14-
15-
16-
const darkTheme = createTheme({
17-
palette: {
18-
mode: 'dark',
19-
},
20-
});
21-
22-
const lightTheme = createTheme({
23-
palette: {
24-
mode: 'light',
25-
},
26-
});
13+
import {darkTheme} from "./themes/DarkTheme";
14+
import {lightTheme} from "./themes/LightTheme";
2715

2816

2917
// Figure out the default dark mode.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {createTheme} from "@mui/material/styles";
2+
3+
4+
export const darkTheme = createTheme({
5+
palette: {
6+
mode: 'dark',
7+
contrastThreshold: 4.5,
8+
},
9+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {createTheme} from "@mui/material/styles";
2+
3+
4+
export const lightTheme = createTheme({
5+
palette: {
6+
mode: 'light',
7+
contrastThreshold: 4.5,
8+
},
9+
})

0 commit comments

Comments
 (0)