1 | import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
3 | import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
4 | import classNames from 'classnames';
|
5 | import React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 | import elementType from 'prop-types-extra/lib/elementType';
|
8 | import { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';
|
9 | var propTypes = {
|
10 | |
11 |
|
12 |
|
13 |
|
14 |
|
15 | fluid: PropTypes.bool,
|
16 |
|
17 | |
18 |
|
19 |
|
20 | componentClass: elementType
|
21 | };
|
22 | var defaultProps = {
|
23 | componentClass: 'div',
|
24 | fluid: false
|
25 | };
|
26 |
|
27 | var Grid =
|
28 |
|
29 | function (_React$Component) {
|
30 | _inheritsLoose(Grid, _React$Component);
|
31 |
|
32 | function Grid() {
|
33 | return _React$Component.apply(this, arguments) || this;
|
34 | }
|
35 |
|
36 | var _proto = Grid.prototype;
|
37 |
|
38 | _proto.render = function render() {
|
39 | var _this$props = this.props,
|
40 | fluid = _this$props.fluid,
|
41 | Component = _this$props.componentClass,
|
42 | className = _this$props.className,
|
43 | props = _objectWithoutPropertiesLoose(_this$props, ["fluid", "componentClass", "className"]);
|
44 |
|
45 | var _splitBsProps = splitBsProps(props),
|
46 | bsProps = _splitBsProps[0],
|
47 | elementProps = _splitBsProps[1];
|
48 |
|
49 | var classes = prefix(bsProps, fluid && 'fluid');
|
50 | return React.createElement(Component, _extends({}, elementProps, {
|
51 | className: classNames(className, classes)
|
52 | }));
|
53 | };
|
54 |
|
55 | return Grid;
|
56 | }(React.Component);
|
57 |
|
58 | Grid.propTypes = propTypes;
|
59 | Grid.defaultProps = defaultProps;
|
60 | export default bsClass('container', Grid); |
\ | No newline at end of file |