blob: 78d1dcbb907a28ad43245a6b49e6c824173f57bf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import makeDarkThemeConfig from './themes/dark';
import makeDefaultThemeConfig from './themes/default';
import * as legacyStyles from './themes/legacy';
export enum ThemeType {
default = 'default',
dark = 'dark',
}
export const DEFAULT_ACCENT_COLOR = legacyStyles.themeBrandPrimary;
export function theme(themeId: ThemeType,
brandColor: string = DEFAULT_ACCENT_COLOR) {
return themeId === ThemeType.dark ?
makeDarkThemeConfig(brandColor) :
makeDefaultThemeConfig(brandColor);
}
const defaultThemeConfigWithDefaultAccentColor =
makeDefaultThemeConfig(DEFAULT_ACCENT_COLOR);
export type Theme = typeof defaultThemeConfigWithDefaultAccentColor;
|