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 | import _extends from 'babel-runtime/helpers/extends';
|
5 | import React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 |
|
8 | import TabContainer from './TabContainer';
|
9 | import TabContent from './TabContent';
|
10 | import TabPane from './TabPane';
|
11 |
|
12 | var propTypes = _extends({}, TabPane.propTypes, {
|
13 |
|
14 | disabled: PropTypes.bool,
|
15 |
|
16 | title: PropTypes.node,
|
17 |
|
18 | |
19 |
|
20 |
|
21 | tabClassName: PropTypes.string
|
22 | });
|
23 |
|
24 | var Tab = function (_React$Component) {
|
25 | _inherits(Tab, _React$Component);
|
26 |
|
27 | function Tab() {
|
28 | _classCallCheck(this, Tab);
|
29 |
|
30 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
31 | }
|
32 |
|
33 | Tab.prototype.render = function render() {
|
34 | var props = _extends({}, this.props);
|
35 |
|
36 |
|
37 | delete props.title;
|
38 | delete props.disabled;
|
39 | delete props.tabClassName;
|
40 |
|
41 | return React.createElement(TabPane, props);
|
42 | };
|
43 |
|
44 | return Tab;
|
45 | }(React.Component);
|
46 |
|
47 | Tab.propTypes = propTypes;
|
48 |
|
49 | Tab.Container = TabContainer;
|
50 | Tab.Content = TabContent;
|
51 | Tab.Pane = TabPane;
|
52 |
|
53 | export default Tab; |
\ | No newline at end of file |