// External imports import * as React from "react" import { Link } from "react-router-dom" // Internal imports import * as ce from "../../../helpers/componentEnhancer" export interface ParentProps { title: string href?: any onClick?: any items?: Array<{ title: string href?: any onClick?: any }> } interface StateProps {} interface DispatchProps {} interface LocalState {} class NavbarItem extends React.Component< ParentProps & StateProps & DispatchProps & ce.EnhancedPropsPrivate, LocalState > { render() { return this.props.items ? (
{this.props.href ? ( {this.props.title} ) : ( {this.props.title} )} {this.props.items ? (
{this.props.items.map( (item, index) => item.href ? ( {item.title} ) : ( {item.title} ) )}
) : null}
) : this.props.href ? ( {this.props.title} ) : ( {this.props.title} ) } } const stateMappings: ce.StateMappings = (s, props) => ({}) const dispatchMappings: ce.DispatchMappings = (d, props) => ({}) export default ((): React.ComponentType => ce.enhance(NavbarItem, { stateMappings, dispatchMappings }))()