MetricsSection.tsx 516 B

123456789101112131415161718192021
  1. import React from 'react';
  2. import { GraphiteQueryEditorState } from '../state/store';
  3. import { GraphiteSegment } from '../types';
  4. import { MetricSegment } from './MetricSegment';
  5. type Props = {
  6. segments: GraphiteSegment[];
  7. state: GraphiteQueryEditorState;
  8. };
  9. export function MetricsSection({ segments = [], state }: Props) {
  10. return (
  11. <>
  12. {segments.map((segment, index) => {
  13. return <MetricSegment segment={segment} metricIndex={index} key={index} state={state} />;
  14. })}
  15. </>
  16. );
  17. }