mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* Updated package json but not updated source files * Update eslint plugin * updated files
18 lines
520 B
TypeScript
18 lines
520 B
TypeScript
import React, { FC } from 'react';
|
|
import { Segment } from '@grafana/ui';
|
|
import { SelectableValue } from '@grafana/data';
|
|
|
|
interface Props {
|
|
value: string;
|
|
onChange: (item: SelectableValue<string>) => void;
|
|
}
|
|
|
|
const options = ['=', '!=', '<', '>', '=~', '!~'].map<SelectableValue<string>>((value) => ({
|
|
label: value,
|
|
value,
|
|
}));
|
|
|
|
export const OperatorSegment: FC<Props> = ({ value, onChange }) => {
|
|
return <Segment className="query-segment-operator" value={value} options={options} onChange={onChange} />;
|
|
};
|