Files
Hugo Häggmark 20c700dd52 Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files

* chore: fixes unit test

* Chore: reduces barrel files part II

* chore: fix import sorting
2025-07-09 06:15:33 +02:00

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);
};