Media editor polish
This commit is contained in:
parent
4d919891fb
commit
1cfc396d65
4 changed files with 47 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue