aboutsummaryrefslogtreecommitdiffstats
path: root/src/themes/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/index.ts')
-rw-r--r--src/themes/index.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/themes/index.ts b/src/themes/index.ts
new file mode 100644
index 000000000..27be4d04b
--- /dev/null
+++ b/src/themes/index.ts
@@ -0,0 +1,21 @@
1import makeDarkThemeConfig from './dark';
2import makeDefaultThemeConfig from './default';
3import { themeBrandPrimary } from './legacy';
4
5export enum ThemeType {
6 default = 'default',
7 dark = 'dark',
8}
9
10export function theme(
11 themeId: ThemeType,
12 brandColor: string = themeBrandPrimary,
13) {
14 return themeId === ThemeType.dark
15 ? makeDarkThemeConfig(brandColor)
16 : makeDefaultThemeConfig(brandColor);
17}
18
19const defaultThemeConfigWithDefaultAccentColor = makeDefaultThemeConfig(themeBrandPrimary);
20
21export type Theme = typeof defaultThemeConfigWithDefaultAccentColor;