diff options
author | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2021-10-15 17:20:09 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 17:20:09 +0530 |
commit | a05ef4bb5101e6e8d999ad0d7383b394996fb763 (patch) | |
tree | 38072e3abe8d0bdaababf0abd1710dc47baa4a3c /src/themes/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 '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; | ||