import classNames from "classnames" ; import * as React from "react" ; import { polyfill } from "react-lifecycles-compat" ; import { AbstractPureComponent2 , Classes } from "../../common" ; import { DISPLAYNAME_PREFIX , HTMLDivProps , Props } from "../../common/props" ; import { NavbarDivider } from "./navbarDivider" ; import { NavbarGroup } from "./navbarGroup" ; import { NavbarHeading } from "./navbarHeading" ; export { INavbarDividerProps , NavbarDividerProps } from "./navbarDivider" ; export type NavbarProps = INavbarProps ; deprecated export interface INavbarProps extends Props , HTMLDivProps { /**
     * Whether this navbar should be fixed to the top of the viewport (using CSS `position: fixed`).
     */ fixedToTop ? : boolean ; } @ polyfill export class Navbar extends AbstractPureComponent2 < NavbarProps > { public static displayName = `${ DISPLAYNAME_PREFIX }.Navbar` ; public static Divider = NavbarDivider ; public static Group = NavbarGroup ; public static Heading = NavbarHeading ; public render ( ) { const { children , className , fixedToTop , ... htmlProps } = this . props ; const classes = classNames ( Classes . NAVBAR , { [ Classes . FIXED_TOP ] : fixedToTop } , className ) ; return ( < div className = { classes } { ... htmlProps } > { children } < /div>); } }