mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: return a promise for loadPluginCss (#18273)
This commit is contained in:
parent
4ce814ba94
commit
7949329636
@ -10,10 +10,7 @@ export interface PluginCssOptions {
|
|||||||
|
|
||||||
export const SystemJS = System;
|
export const SystemJS = System;
|
||||||
|
|
||||||
export function loadPluginCss(options: PluginCssOptions) {
|
export function loadPluginCss(options: PluginCssOptions): Promise<any> {
|
||||||
if (config.bootData.user.lightTheme) {
|
const theme = config.bootData.user.lightTheme ? options.light : options.dark;
|
||||||
SystemJS.import(`${options.light}!css`);
|
return SystemJS.import(`${theme}!css`);
|
||||||
} else {
|
|
||||||
SystemJS.import(`${options.dark}!css`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user