import React, { Dispatch, SetStateAction } from 'react'; import { Tab, TabsBar } from '@grafana/ui'; import { GeomapLayerHover } from '../event'; type Props = { layers?: GeomapLayerHover[]; setActiveTabIndex: Dispatch>; activeTabIndex: number; }; export const DataHoverTabs = ({ layers, setActiveTabIndex, activeTabIndex }: Props) => { return ( {layers && layers.map((g, index) => ( 1 ? g.features.length : null} onChangeTab={() => { setActiveTabIndex(index); }} /> ))} ); };