mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 00:04:22 +08:00
feat(plugins): changed so that plugins can load css async via util function exposed from app/plugins/sdk
This commit is contained in:
@ -2,6 +2,16 @@ import {PanelCtrl} from 'app/features/panel/panel_ctrl';
|
||||
import {MetricsPanelCtrl} from 'app/features/panel/metrics_panel_ctrl';
|
||||
import {QueryCtrl} from 'app/features/panel/query_ctrl';
|
||||
|
||||
import config from 'app/core/config';
|
||||
|
||||
export function loadPluginCss(options) {
|
||||
if (config.bootData.user.lightTheme) {
|
||||
System.import(options.light + '!css');
|
||||
} else {
|
||||
System.import(options.dark + '!css');
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
PanelCtrl,
|
||||
MetricsPanelCtrl,
|
||||
|
Reference in New Issue
Block a user