import classNames from "classnames" ; import * as React from "react" ; import * as Classes from "../../common/classes" ; import { DISPLAYNAME_PREFIX , Props } from "../../common/props" ; import { H6 } from "../html/html" ; export type MenuDividerProps = IMenuDividerProps ; deprecated export interface IMenuDividerProps extends Props { /** This component does not support children. */ children ? : never ; /** Optional header title. */ title ? : React . ReactNode ; } export class MenuDivider extends React . Component < MenuDividerProps > { public static displayName = `${ DISPLAYNAME_PREFIX }.MenuDivider` ; public render ( ) { const { className , title } = this . props ; if ( title == null ) { return < li className = { classNames ( Classes . MENU_DIVIDER , className ) } />; } else { return ( < li className = { classNames ( Classes . MENU_HEADER , className ) } > < H6 > { title } < /H6> < /li>); } } }