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