Media editor polish

This commit is contained in:
Josh Perez 2023-09-21 12:54:28 -04:00 committed by GitHub
parent 4d919891fb
commit 1cfc396d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 22 deletions

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { missingCaseError } from './missingCaseError';
import { ThemeType } from '../types/Util';
export enum Theme {
Light,
@ -18,3 +19,14 @@ export function themeClassName(theme: Theme): string {
throw missingCaseError(theme);
}
}
export function themeClassName2(theme: ThemeType): string {
switch (theme) {
case ThemeType.light:
return 'light-theme';
case ThemeType.dark:
return 'dark-theme';
default:
throw missingCaseError(theme);
}
}