mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-09-16 09:45:42 +08:00
9 lines
337 B
TypeScript
9 lines
337 B
TypeScript
export const DEFAULT_THEME = 'magic-admin';
|
|
|
|
const themeLoaders: Record<string, () => Promise<unknown>> = {
|
|
default: () => import('@tmagic/editor/dist/style.css'),
|
|
'magic-admin': () => import('@tmagic/editor/dist/themes/magic-admin.css'),
|
|
};
|
|
|
|
export const loadTheme = (theme: string) => themeLoaders[theme]?.() ?? Promise.resolve();
|