mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Updated package json but not updated source files * Update eslint plugin * updated files
28 lines
647 B
TypeScript
28 lines
647 B
TypeScript
import React, { FC } from 'react';
|
|
import { css } from 'emotion';
|
|
import { Icon, IconName, useTheme } from '@grafana/ui';
|
|
|
|
export interface Props {
|
|
child: any;
|
|
}
|
|
|
|
const DropDownChild: FC<Props> = (props) => {
|
|
const { child } = props;
|
|
const listItemClassName = child.divider ? 'divider' : '';
|
|
const theme = useTheme();
|
|
const iconClassName = css`
|
|
margin-right: ${theme.spacing.sm};
|
|
`;
|
|
|
|
return (
|
|
<li className={listItemClassName}>
|
|
<a href={child.url}>
|
|
{child.icon && <Icon name={child.icon as IconName} className={iconClassName} />}
|
|
{child.text}
|
|
</a>
|
|
</li>
|
|
);
|
|
};
|
|
|
|
export default DropDownChild;
|