mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -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
604 B
TypeScript
24 lines
604 B
TypeScript
import React, { SFC } from 'react';
|
|
import SideMenuDropDown from './SideMenuDropDown';
|
|
|
|
export interface Props {
|
|
link: any;
|
|
}
|
|
|
|
const TopSectionItem: SFC<Props> = props => {
|
|
const { link } = props;
|
|
return (
|
|
<div className="sidemenu-item dropdown">
|
|
<a className="sidemenu-link" href={link.url} target={link.target}>
|
|
<span className="icon-circle sidemenu-icon">
|
|
<i className={link.icon} />
|
|
{link.img && <img src={link.img} />}
|
|
</span>
|
|
</a>
|
|
{link.children && <SideMenuDropDown link={link} />}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default TopSectionItem;
|