mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 01:15:46 +08:00

* Chore: reduce barrel files * chore: fixes unit test * Chore: reduces barrel files part II * chore: fix import sorting
12 lines
431 B
TypeScript
12 lines
431 B
TypeScript
import { PanelPlugin } from '@grafana/data';
|
|
import { StoreState } from 'app/types/store';
|
|
|
|
import { getPanelPluginNotFound } from '../../panel/components/PanelPluginError';
|
|
|
|
export const getPanelPluginWithFallback =
|
|
(panelType: string) =>
|
|
(state: StoreState): PanelPlugin => {
|
|
const plugin = state.plugins.panels[panelType];
|
|
return plugin || getPanelPluginNotFound(`Panel plugin not found (${panelType})`, true);
|
|
};
|