mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 11:42:35 -06:00
401615847c
first step in moving non-ui components to their own package
27 lines
732 B
TypeScript
27 lines
732 B
TypeScript
import React, { FC } from 'react';
|
|
import DropDownChild from './DropDownChild';
|
|
import { NavModelItem } from '@grafana/data';
|
|
|
|
interface Props {
|
|
link: NavModelItem;
|
|
}
|
|
|
|
const SideMenuDropDown: FC<Props> = props => {
|
|
const { link } = props;
|
|
return (
|
|
<ul className="dropdown-menu dropdown-menu--sidemenu" role="menu">
|
|
<li className="side-menu-header">
|
|
<a className="side-menu-header-link" href={link.url}>
|
|
<span className="sidemenu-item-text">{link.text}</span>
|
|
</a>
|
|
</li>
|
|
{link.children &&
|
|
link.children.map((child, index) => {
|
|
return <DropDownChild child={child} key={`${child.url}-${index}`} />;
|
|
})}
|
|
</ul>
|
|
);
|
|
};
|
|
|
|
export default SideMenuDropDown;
|