diff options
author | Eric Bailey <git@esb.lol> | 2024-05-31 14:45:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 20:45:41 +0100 |
commit | 5cda807d9dcdbc5ed5dbb51a9c43123d60734c8a (patch) | |
tree | e080ec65e68779ef2027d5debf04971bec3ec439 /src/alf/util/themeSelector.ts | |
parent | f868821cfcc87b62a320e5a1e11375fdb973adc1 (diff) | |
download | voidsky-5cda807d9dcdbc5ed5dbb51a9c43123d60734c8a.tar.zst |
Tweak avi follow button styles (#4304)
* Tighten up * Tweak colors * Tweak for night mode * Add missing file * Contrast plus
Diffstat (limited to 'src/alf/util/themeSelector.ts')
-rw-r--r-- | src/alf/util/themeSelector.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/alf/util/themeSelector.ts b/src/alf/util/themeSelector.ts new file mode 100644 index 000000000..f484bc526 --- /dev/null +++ b/src/alf/util/themeSelector.ts @@ -0,0 +1,14 @@ +import {ThemeName} from '#/alf/themes' + +export function select<T>(name: ThemeName, options: Record<ThemeName, T>) { + switch (name) { + case 'light': + return options.light + case 'dark': + return options.dark || options.dim + case 'dim': + return options.dim || options.dark + default: + throw new Error(`select(theme, options) received unknown theme ${name}`) + } +} |