import React, { FunctionComponent } from 'react'; import { SelectableValue } from '@grafana/data'; import { Switch } from '@grafana/ui'; import { GRAPH_PERIODS, SELECT_WIDTH } from '../constants'; import { PeriodSelect, QueryEditorRow } from '.'; export interface Props { refId: string; onChange: (period: string) => void; variableOptionGroup: SelectableValue; graphPeriod?: string; } export const GraphPeriod: FunctionComponent = ({ refId, onChange, graphPeriod, variableOptionGroup }) => { 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')} /> ); };