mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Plugins: ReactPanelPlugin renamed * Plugins: renamed PanelPlugin to PanelPluginMeta and VizPanelPlugin to PanelPlugin
16 lines
506 B
TypeScript
16 lines
506 B
TypeScript
import { PanelPlugin } from '@grafana/ui';
|
|
|
|
import { TextPanelEditor } from './TextPanelEditor';
|
|
import { TextPanel } from './TextPanel';
|
|
import { TextOptions, defaults } from './types';
|
|
|
|
export const plugin = new PanelPlugin<TextOptions>(TextPanel)
|
|
.setDefaults(defaults)
|
|
.setEditor(TextPanelEditor)
|
|
.setPanelChangeHandler((options: TextOptions, prevPluginId: string, prevOptions: any) => {
|
|
if (prevPluginId === 'text') {
|
|
return prevOptions as TextOptions;
|
|
}
|
|
return options;
|
|
});
|