diff options
Diffstat (limited to 'src/themes/index.ts')
-rw-r--r-- | src/themes/index.ts | 21 |
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 @@ | |||
1 | import makeDarkThemeConfig from './dark'; | ||
2 | import makeDefaultThemeConfig from './default'; | ||
3 | import { themeBrandPrimary } from './legacy'; | ||
4 | |||
5 | export enum ThemeType { | ||
6 | default = 'default', | ||
7 | dark = 'dark', | ||
8 | } | ||
9 | |||
10 | export function theme( | ||
11 | themeId: ThemeType, | ||
12 | brandColor: string = themeBrandPrimary, | ||
13 | ) { | ||
14 | return themeId === ThemeType.dark | ||
15 | ? makeDarkThemeConfig(brandColor) | ||
16 | : makeDefaultThemeConfig(brandColor); | ||
17 | } | ||
18 | |||
19 | const defaultThemeConfigWithDefaultAccentColor = makeDefaultThemeConfig(themeBrandPrimary); | ||
20 | |||
21 | export type Theme = typeof defaultThemeConfigWithDefaultAccentColor; | ||