import * as React from 'react'; import IReactComponentProps from '../../../common/structures/IReactComponentProps'; import classnames from 'classnames'; import styles from './TabNav.sass'; interface IProps extends IReactComponentProps { tag?: string; itemsClassName?: string; aux?: React.ReactNode; // Used for adding items in the right-hand side of the TabNav such as Site Info buttons } export default class TabNav extends React.Component { static defaultProps: Partial = { tag: 'nav', }; maybeRenderAux () { if (!this.props.aux) { return; } return (
{this.props.aux}
); } render () { const NavTag: any = this.props.tag; return (
{this.props.children}
{this.maybeRenderAux()}
); } }