import React, { FC } from 'react'; import { filter } from 'lodash'; import DropDownChild from './DropDownChild'; import { NavModelItem } from '@grafana/data'; import { Link } from '@grafana/ui'; interface Props { link: NavModelItem; onHeaderClick?: () => void; } const SideMenuDropDown: FC = (props) => { const { link, onHeaderClick } = props; let childrenLinks: NavModelItem[] = []; if (link.children) { childrenLinks = filter(link.children, (item) => !item.hideFromMenu); } const linkContent = {link.text}; const anchor = link.url ? ( {linkContent} ) : ( {linkContent} ); return ( ); }; export default SideMenuDropDown;