D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
grafana
/
public
/
app
/
features
/
variables
/
adhoc
/
picker
/
Filename :
OperatorSegment.tsx
back
Copy
import React from 'react'; import { SelectableValue } from '@grafana/data'; import { Segment } from '@grafana/ui'; interface Props { value: string; onChange: (item: SelectableValue<string>) => void; disabled?: boolean; } const options = ['=', '!=', '<', '>', '=~', '!~'].map<SelectableValue<string>>((value) => ({ label: value, value, })); export const OperatorSegment = ({ value, disabled, onChange }: Props) => { return ( <Segment className="query-segment-operator" value={value} disabled={disabled} options={options} onChange={onChange} /> ); };