mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
22 lines
513 B
TypeScript
22 lines
513 B
TypeScript
import React from 'react';
|
|
|
|
import { FieldConfigEditorProps, StatsPickerConfigSettings } from '@grafana/data';
|
|
import { StatsPicker } from '@grafana/ui';
|
|
|
|
export const StatsPickerEditor: React.FC<FieldConfigEditorProps<string[], StatsPickerConfigSettings>> = ({
|
|
value,
|
|
onChange,
|
|
item,
|
|
id,
|
|
}) => {
|
|
return (
|
|
<StatsPicker
|
|
stats={value}
|
|
onChange={onChange}
|
|
allowMultiple={!!item.settings?.allowMultiple}
|
|
defaultStat={item.settings?.defaultStat}
|
|
inputId={id}
|
|
/>
|
|
);
|
|
};
|