@blueprintjs/core
Version:
Core styles & components
26 lines • 1.11 kB
JavaScript
/*
* Copyright 2017 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the terms of the LICENSE file distributed with this project.
*/
import classNames from "classnames";
import * as React from "react";
import * as Classes from "../../common/classes";
import { DISPLAYNAME_PREFIX } from "../../common/props";
import { NavbarDivider } from "./navbarDivider";
import { NavbarGroup } from "./navbarGroup";
import { NavbarHeading } from "./navbarHeading";
// this component is simple enough that tests would be purely tautological.
/* istanbul ignore next */
export class Navbar extends React.PureComponent {
render() {
const { children, className, fixedToTop, ...htmlProps } = this.props;
const classes = classNames(Classes.NAVBAR, { [Classes.FIXED_TOP]: fixedToTop }, className);
return (React.createElement("div", Object.assign({ className: classes }, htmlProps), children));
}
}
Navbar.displayName = `${DISPLAYNAME_PREFIX}.Navbar`;
Navbar.Divider = NavbarDivider;
Navbar.Group = NavbarGroup;
Navbar.Heading = NavbarHeading;
//# sourceMappingURL=navbar.js.map