grafana/public/app/core/components/sidemenu/DropDownChild.tsx
Peter Holmberg cab6861d27 Reactify sidebar (#13091)
* 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
2018-09-04 17:24:08 +02:00

22 lines
423 B
TypeScript

import React, { SFC } from 'react';
export interface Props {
child: any;
}
const DropDownChild: SFC<Props> = props => {
const { child } = props;
const listItemClassName = child.divider ? 'divider' : '';
return (
<li className={listItemClassName}>
<a href={child.url}>
{child.icon && <i className={child.icon} />}
{child.text}
</a>
</li>
);
};
export default DropDownChild;