1 | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
2 | import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
3 | import _inherits from 'babel-runtime/helpers/inherits';
|
4 |
|
5 | var _class, _temp;
|
6 |
|
7 | import React, { Component } from 'react';
|
8 | import PropTypes from 'prop-types';
|
9 |
|
10 |
|
11 | var Wrapper = (_temp = _class = function (_Component) {
|
12 | _inherits(Wrapper, _Component);
|
13 |
|
14 | function Wrapper() {
|
15 | _classCallCheck(this, Wrapper);
|
16 |
|
17 | return _possibleConstructorReturn(this, _Component.apply(this, arguments));
|
18 | }
|
19 |
|
20 | Wrapper.prototype.render = function render() {
|
21 | var _props = this.props,
|
22 | colGroup = _props.colGroup,
|
23 | children = _props.children,
|
24 | tableWidth = _props.tableWidth,
|
25 | Tag = _props.component;
|
26 |
|
27 | return React.createElement(
|
28 | Tag,
|
29 | { role: 'table', style: { width: tableWidth } },
|
30 | colGroup,
|
31 | children
|
32 | );
|
33 | };
|
34 |
|
35 | return Wrapper;
|
36 | }(Component), _class.propTypes = {
|
37 | tableWidth: PropTypes.number
|
38 | }, _temp);
|
39 | Wrapper.displayName = 'Wrapper';
|
40 | export { Wrapper as default };
|
41 |
|
42 |
|
43 | Wrapper.defaultProps = {
|
44 | component: 'table'
|
45 | };
|
46 |
|
47 | Wrapper.propTypes = {
|
48 | children: PropTypes.any,
|
49 | prefix: PropTypes.string,
|
50 | colGroup: PropTypes.any,
|
51 | component: PropTypes.string
|
52 | }; |
\ | No newline at end of file |