diff options
author | 2019-01-08 21:41:11 +0100 | |
---|---|---|
committer | 2019-01-08 21:41:11 +0100 | |
commit | 6aab4ab890c0ca2f99bc615b7048533774f6ff68 (patch) | |
tree | 088d86001efa2a6d825ad51259a2df9b62b201fe /packages/theme/src | |
parent | wip (diff) | |
download | ferdium-app-6aab4ab890c0ca2f99bc615b7048533774f6ff68.tar.gz ferdium-app-6aab4ab890c0ca2f99bc615b7048533774f6ff68.tar.zst ferdium-app-6aab4ab890c0ca2f99bc615b7048533774f6ff68.zip |
Make packages work in electron, node and web
Diffstat (limited to 'packages/theme/src')
-rw-r--r-- | packages/theme/src/index.ts | 10 | ||||
-rw-r--r-- | packages/theme/src/themes/dark/index.ts | 2 | ||||
-rw-r--r-- | packages/theme/src/themes/default/index.ts | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/packages/theme/src/index.ts b/packages/theme/src/index.ts index ce077e817..423fa0385 100644 --- a/packages/theme/src/index.ts +++ b/packages/theme/src/index.ts | |||
@@ -1,17 +1,17 @@ | |||
1 | import * as darkThemeConfig from './themes/dark'; | ||
2 | import * as defaultThemeConfig from './themes/default'; | ||
3 | |||
1 | export enum ThemeType { | 4 | export enum ThemeType { |
2 | default = 'default', | 5 | default = 'default', |
3 | dark = 'dark', | 6 | dark = 'dark', |
4 | } | 7 | } |
5 | 8 | ||
6 | import * as darkThemeConfig from './themes/dark'; | 9 | export function theme(themeId: ThemeType) { |
7 | import * as defaultThemeConfig from './themes/default'; | ||
8 | |||
9 | export default (themeId: ThemeType) => { | ||
10 | if (themeId === ThemeType.dark) { | 10 | if (themeId === ThemeType.dark) { |
11 | return Object.assign({}, defaultThemeConfig, darkThemeConfig); | 11 | return Object.assign({}, defaultThemeConfig, darkThemeConfig); |
12 | } | 12 | } |
13 | 13 | ||
14 | return Object.assign({}, defaultThemeConfig); | 14 | return Object.assign({}, defaultThemeConfig); |
15 | }; | 15 | } |
16 | 16 | ||
17 | export type Theme = typeof defaultThemeConfig; | 17 | export type Theme = typeof defaultThemeConfig; |
diff --git a/packages/theme/src/themes/dark/index.ts b/packages/theme/src/themes/dark/index.ts index 3c17d03ae..7eac5a3c3 100644 --- a/packages/theme/src/themes/dark/index.ts +++ b/packages/theme/src/themes/dark/index.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as color from 'color'; | 1 | import color from 'color'; |
2 | 2 | ||
3 | import * as legacyStyles from '../legacy'; | 3 | import * as legacyStyles from '../legacy'; |
4 | 4 | ||
diff --git a/packages/theme/src/themes/default/index.ts b/packages/theme/src/themes/default/index.ts index f7d58a375..b22730413 100644 --- a/packages/theme/src/themes/default/index.ts +++ b/packages/theme/src/themes/default/index.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as color from 'color'; | 1 | import color from 'color'; |
2 | 2 | ||
3 | import * as legacyStyles from '../legacy'; | 3 | import * as legacyStyles from '../legacy'; |
4 | 4 | ||