import React, { SFC } from 'react'; import _ from 'lodash'; import { MetricSelect } from 'app/core/components/Select/MetricSelect'; import { alignmentPeriods } from '../constants'; export interface Props { onChange: (alignmentPeriod) => void; templateSrv: any; alignmentPeriod: string; } export const AlignmentPeriods: SFC = ({ alignmentPeriod, templateSrv, onChange }) => { return ( <>
onChange(value)} value={alignmentPeriod} variables={templateSrv.variables} options={[ { label: 'Alignment options', expanded: true, options: alignmentPeriods.map(ap => ({ ...ap, label: ap.text, })), }, ]} placeholder="Select Alignment" className="width-15" />
); };