import * as React from 'react'; import PropTypes from 'prop-types'; import { TreeList } from '@extjs/ext-react'; declare var Ext:any; Ext.require('Ext.data.TreeStore'); interface NavMenuProps { onItemClick: Function, selection: string } /** * The main navigation menu */ const NavMenu: React.SFC = ({ onItemClick, selection, ...props }) => ( onItemClick(item.node.getId())} selection={selection} store={{ root: { children: [ { id: '/', text: 'Home', iconCls: 'x-fa fa-home', leaf: true }, { id: '/about', text: 'About', iconCls: 'x-fa fa-info', leaf: true }, ] } }} /> ) export default NavMenu;