import { IHeadingNode , IPageNode } from "@documentalist/client" ; import classNames from "classnames" ; import * as React from "react" ; import { Classes } from "@blueprintjs/core" ; export type NavMenuItemProps = INavMenuItemProps ; deprecated export interface INavMenuItemProps { /** CSS classes to apply to the root element, for proper appearance in the tree. */ className : string ; /** Link URL. */ href : string ; /** Whether this item is the active section (currently being viewed) */ isActive : boolean ; /** Whether this section is expanded (it or a child is being viewed) */ isExpanded : boolean ; /** Click handler for item, to navigate to URL. */ onClick : ( ) => void ; /** The section for this menu item, either a page or a heading node. */ section : IPageNode | IHeadingNode ; } export const NavMenuItem = props => { const { className , isActive , isExpanded , section , ... htmlProps } = props ; return ( < a className = { classNames ( Classes . MENU_ITEM , className ) } { ... htmlProps } > < span > { section . title } < /span> { props . children } < /a>); } ; NavMenuItem . displayName = "Docs2.NavMenuItem" ;