diff options
author | 2021-10-15 17:20:09 +0530 | |
---|---|---|
committer | 2021-10-15 17:20:09 +0530 | |
commit | a05ef4bb5101e6e8d999ad0d7383b394996fb763 (patch) | |
tree | 38072e3abe8d0bdaababf0abd1710dc47baa4a3c /packages/theme/src/index.ts | |
parent | chore: move 'packages/forms' into 'src' (no longer an injected package) (#2079) (diff) | |
download | ferdium-app-a05ef4bb5101e6e8d999ad0d7383b394996fb763.tar.gz ferdium-app-a05ef4bb5101e6e8d999ad0d7383b394996fb763.tar.zst ferdium-app-a05ef4bb5101e6e8d999ad0d7383b394996fb763.zip |
chore: move 'packages/themes' into 'src' (no longer an injected package) (#2080)
Diffstat (limited to 'packages/theme/src/index.ts')
-rw-r--r-- | packages/theme/src/index.ts | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/packages/theme/src/index.ts b/packages/theme/src/index.ts deleted file mode 100644 index 5ba225e51..000000000 --- a/packages/theme/src/index.ts +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | import makeDarkThemeConfig from './themes/dark'; | ||
2 | import makeDefaultThemeConfig from './themes/default'; | ||
3 | import { themeBrandPrimary } from './themes/legacy'; | ||
4 | |||
5 | export enum ThemeType { | ||
6 | default = 'default', | ||
7 | dark = 'dark', | ||
8 | } | ||
9 | |||
10 | export const DEFAULT_ACCENT_COLOR = themeBrandPrimary; | ||
11 | |||
12 | export function theme( | ||
13 | themeId: ThemeType, | ||
14 | brandColor: string = DEFAULT_ACCENT_COLOR, | ||
15 | ) { | ||
16 | return themeId === ThemeType.dark | ||
17 | ? makeDarkThemeConfig(brandColor) | ||
18 | : makeDefaultThemeConfig(brandColor); | ||
19 | } | ||
20 | |||
21 | const defaultThemeConfigWithDefaultAccentColor = | ||
22 | makeDefaultThemeConfig(DEFAULT_ACCENT_COLOR); | ||
23 | |||
24 | export type Theme = typeof defaultThemeConfigWithDefaultAccentColor; | ||