aboutsummaryrefslogtreecommitdiffstats
path: root/src/themes/index.ts
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-10-15 17:20:09 +0530
committerLibravatar GitHub <noreply@github.com>2021-10-15 17:20:09 +0530
commita05ef4bb5101e6e8d999ad0d7383b394996fb763 (patch)
tree38072e3abe8d0bdaababf0abd1710dc47baa4a3c /src/themes/index.ts
parentchore: move 'packages/forms' into 'src' (no longer an injected package) (#2079) (diff)
downloadferdium-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.ts21
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 @@
1import makeDarkThemeConfig from './dark';
2import makeDefaultThemeConfig from './default';
3import { themeBrandPrimary } from './legacy';
4
5export enum ThemeType {
6 default = 'default',
7 dark = 'dark',
8}
9
10export function theme(
11 themeId: ThemeType,
12 brandColor: string = themeBrandPrimary,
13) {
14 return themeId === ThemeType.dark
15 ? makeDarkThemeConfig(brandColor)
16 : makeDefaultThemeConfig(brandColor);
17}
18
19const defaultThemeConfigWithDefaultAccentColor = makeDefaultThemeConfig(themeBrandPrimary);
20
21export type Theme = typeof defaultThemeConfigWithDefaultAccentColor;