1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
4 | import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
5 | import _inherits from 'babel-runtime/helpers/inherits';
|
6 | import classNames from 'classnames';
|
7 | import React from 'react';
|
8 | import PropTypes from 'prop-types';
|
9 |
|
10 | import { prefix } from './utils/bootstrapUtils';
|
11 |
|
12 | var contextTypes = {
|
13 | $bs_navbar: PropTypes.shape({
|
14 | bsClass: PropTypes.string
|
15 | })
|
16 | };
|
17 |
|
18 | var NavbarHeader = function (_React$Component) {
|
19 | _inherits(NavbarHeader, _React$Component);
|
20 |
|
21 | function NavbarHeader() {
|
22 | _classCallCheck(this, NavbarHeader);
|
23 |
|
24 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
25 | }
|
26 |
|
27 | NavbarHeader.prototype.render = function render() {
|
28 | var _props = this.props,
|
29 | className = _props.className,
|
30 | props = _objectWithoutProperties(_props, ['className']);
|
31 |
|
32 | var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };
|
33 |
|
34 | var bsClassName = prefix(navbarProps, 'header');
|
35 |
|
36 | return React.createElement('div', _extends({}, props, { className: classNames(className, bsClassName) }));
|
37 | };
|
38 |
|
39 | return NavbarHeader;
|
40 | }(React.Component);
|
41 |
|
42 | NavbarHeader.contextTypes = contextTypes;
|
43 |
|
44 | export default NavbarHeader; |
\ | No newline at end of file |