aboutsummaryrefslogtreecommitdiffstats
path: root/packages/theme/src/index.ts
blob: 524a9edf1a7d17683b99649cad77e9615a4aeb22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import * as darkThemeConfig from './themes/dark';
import * as defaultThemeConfig from './themes/default';
import * as legacyStyles from './themes/legacy';

export enum ThemeType {
  default = 'default',
  dark = 'dark',
}

export function theme(themeId: ThemeType) {
  if (themeId === ThemeType.dark) {
    return Object.assign({}, defaultThemeConfig, darkThemeConfig, { legacyStyles });
  }

  return Object.assign({}, defaultThemeConfig, { legacyStyles });
}

export type Theme = typeof defaultThemeConfig;