import React from 'react'; import { SelectableValue } from '@grafana/data'; import { EditorField, EditorRow } from '@grafana/experimental'; import { HorizontalGroup, Switch } from '@grafana/ui'; import { GRAPH_PERIODS } from '../constants'; import { PeriodSelect } from './index'; export interface Props { refId: string; onChange: (period: string) => void; variableOptionGroup: SelectableValue; graphPeriod?: string; } export const GraphPeriod = ({ refId, onChange, graphPeriod, variableOptionGroup }: Props) => { return ( Set graph_period which forces a preferred period between points. Automatically set to the current interval if left blank. } > onChange(e.currentTarget.checked ? '' : 'disabled')} /> ); };