mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* created react component and moved markdown * extracting components * Broke out parts into components * tests * Flattened file structure * Tests * made instances typed in test * typing * function instead of variable * updated user model with missing properties * added full set of properties to user mock * redone from variable to function * refactor: minor refactorings of #13091 * removed logging
24 lines
602 B
TypeScript
24 lines
602 B
TypeScript
import React, { SFC } from 'react';
|
|
import DropDownChild from './DropDownChild';
|
|
|
|
interface Props {
|
|
link: any;
|
|
}
|
|
|
|
const SideMenuDropDown: SFC<Props> = props => {
|
|
const { link } = props;
|
|
return (
|
|
<ul className="dropdown-menu dropdown-menu--sidemenu" role="menu">
|
|
<li className="side-menu-header">
|
|
<span className="sidemenu-item-text">{link.text}</span>
|
|
</li>
|
|
{link.children &&
|
|
link.children.map((child, index) => {
|
|
return <DropDownChild child={child} key={`${child.url}-${index}`} />;
|
|
})}
|
|
</ul>
|
|
);
|
|
};
|
|
|
|
export default SideMenuDropDown;
|