From 8c17d730eff3bb59313a2f9f7aa469fe6fff95b2 Mon Sep 17 00:00:00 2001 From: Sascha Date: Tue, 23 Feb 2021 16:03:07 +0100 Subject: Add button to toggle between light- and dark-mode --- webui/src/theme.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'webui/src/theme.ts') diff --git a/webui/src/theme.ts b/webui/src/theme.ts index d41cd731..3d536941 100644 --- a/webui/src/theme.ts +++ b/webui/src/theme.ts @@ -2,6 +2,7 @@ import { createMuiTheme } from '@material-ui/core/styles'; const theme = createMuiTheme({ palette: { + type: 'dark', primary: { main: '#263238', }, -- cgit From 9cac03652c410f943abe1e3a6b55dce0d79e48d6 Mon Sep 17 00:00:00 2001 From: Sascha Date: Mon, 1 Mar 2021 17:47:57 +0100 Subject: Inject theme instead of defining it in Themer.tsx --- webui/src/theme.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'webui/src/theme.ts') diff --git a/webui/src/theme.ts b/webui/src/theme.ts index 3d536941..67c24526 100644 --- a/webui/src/theme.ts +++ b/webui/src/theme.ts @@ -1,6 +1,15 @@ import { createMuiTheme } from '@material-ui/core/styles'; -const theme = createMuiTheme({ +const defaultLightTheme = createMuiTheme({ + palette: { + type: 'light', + primary: { + main: '#263238', + }, + }, +}); + +const defaultDarkTheme = createMuiTheme({ palette: { type: 'dark', primary: { @@ -9,4 +18,4 @@ const theme = createMuiTheme({ }, }); -export default theme; +export { defaultLightTheme, defaultDarkTheme }; -- cgit From 548febcbc7af50e8f33c393d481fa253f27aa795 Mon Sep 17 00:00:00 2001 From: Sascha Date: Tue, 2 Mar 2021 13:29:36 +0100 Subject: Define each theme in own file under themes dir --- webui/src/theme.ts | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 webui/src/theme.ts (limited to 'webui/src/theme.ts') diff --git a/webui/src/theme.ts b/webui/src/theme.ts deleted file mode 100644 index 67c24526..00000000 --- a/webui/src/theme.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { createMuiTheme } from '@material-ui/core/styles'; - -const defaultLightTheme = createMuiTheme({ - palette: { - type: 'light', - primary: { - main: '#263238', - }, - }, -}); - -const defaultDarkTheme = createMuiTheme({ - palette: { - type: 'dark', - primary: { - main: '#263238', - }, - }, -}); - -export { defaultLightTheme, defaultDarkTheme }; -- cgit