forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
520 B
17 lines
520 B
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} />;
|
|
};
|
|
|