import { Button } from '@grafana/ui';
import { css } from 'emotion';
import React from 'react';
import { ExemplarTraceIdDestination } from '../types';
import ExemplarSetting from './ExemplarSetting';
type Props = {
options?: ExemplarTraceIdDestination[];
onChange: (value: ExemplarTraceIdDestination[]) => void;
};
export function ExemplarsSettings({ options, onChange }: Props) {
return (
<>
Exemplars
{options &&
options.map((option, index) => {
return (
{
const newOptions = [...options];
newOptions.splice(index, 1, newField);
onChange(newOptions);
}}
onDelete={() => {
const newOptions = [...options];
newOptions.splice(index, 1);
onChange(newOptions);
}}
/>
);
})}
>
);
}