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 |
|
9 | import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
10 |
|
11 | var PageHeader = function (_React$Component) {
|
12 | _inherits(PageHeader, _React$Component);
|
13 |
|
14 | function PageHeader() {
|
15 | _classCallCheck(this, PageHeader);
|
16 |
|
17 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
18 | }
|
19 |
|
20 | PageHeader.prototype.render = function render() {
|
21 | var _props = this.props,
|
22 | className = _props.className,
|
23 | children = _props.children,
|
24 | props = _objectWithoutProperties(_props, ['className', 'children']);
|
25 |
|
26 | var _splitBsProps = splitBsProps(props),
|
27 | bsProps = _splitBsProps[0],
|
28 | elementProps = _splitBsProps[1];
|
29 |
|
30 | var classes = getClassSet(bsProps);
|
31 |
|
32 | return React.createElement(
|
33 | 'div',
|
34 | _extends({}, elementProps, { className: classNames(className, classes) }),
|
35 | React.createElement(
|
36 | 'h1',
|
37 | null,
|
38 | children
|
39 | )
|
40 | );
|
41 | };
|
42 |
|
43 | return PageHeader;
|
44 | }(React.Component);
|
45 |
|
46 | export default bsClass('page-header', PageHeader); |
\ | No newline at end of file |