import React, { FormEvent } from 'react'; import { PanelOptionsEditorProps, PanelProps } from '@grafana/data'; import { Field, Input, usePanelContext } from '@grafana/ui'; import { DebugPanelOptions } from './types'; export function StateView(props: PanelProps) { const context = usePanelContext(); const onChangeName = (e: FormEvent) => { context.onInstanceStateChange!({ name: e.currentTarget.value, }); }; return ( <> ); } export function StateViewEditor({ value, context, onChange, item }: PanelOptionsEditorProps) { return
Current value: {context.instanceState?.name}
; }