Skip to content

Commit 95eae77

Browse files
Build
1 parent 99204f5 commit 95eae77

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

dist/react-simpletabs.js

+23-26
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,41 @@
2020
return /******/ (function(modules) { // webpackBootstrap
2121
/******/ // The module cache
2222
/******/ var installedModules = {};
23-
/******/
23+
2424
/******/ // The require function
2525
/******/ function __webpack_require__(moduleId) {
26-
/******/
26+
2727
/******/ // Check if module is in cache
2828
/******/ if(installedModules[moduleId])
2929
/******/ return installedModules[moduleId].exports;
30-
/******/
30+
3131
/******/ // Create a new module (and put it into the cache)
3232
/******/ var module = installedModules[moduleId] = {
3333
/******/ exports: {},
3434
/******/ id: moduleId,
3535
/******/ loaded: false
3636
/******/ };
37-
/******/
37+
3838
/******/ // Execute the module function
3939
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
40-
/******/
40+
4141
/******/ // Flag the module as loaded
4242
/******/ module.loaded = true;
43-
/******/
43+
4444
/******/ // Return the exports of the module
4545
/******/ return module.exports;
4646
/******/ }
47-
/******/
48-
/******/
47+
48+
4949
/******/ // expose the modules object (__webpack_modules__)
5050
/******/ __webpack_require__.m = modules;
51-
/******/
51+
5252
/******/ // expose the module cache
5353
/******/ __webpack_require__.c = installedModules;
54-
/******/
54+
5555
/******/ // __webpack_public_path__
5656
/******/ __webpack_require__.p = "";
57-
/******/
57+
5858
/******/ // Load entry module and return exports
5959
/******/ return __webpack_require__(0);
6060
/******/ })
@@ -84,10 +84,7 @@ return /******/ (function(modules) { // webpackBootstrap
8484
onMount: React.PropTypes.func,
8585
onBeforeChange: React.PropTypes.func,
8686
onAfterChange: React.PropTypes.func,
87-
children: React.PropTypes.oneOfType([
88-
React.PropTypes.array,
89-
React.PropTypes.element
90-
]).isRequired
87+
children: React.PropTypes.node.isRequired
9188
},
9289
getDefaultProps:function () {
9390
return { tabActive: 1 };
@@ -142,16 +139,15 @@ return /******/ (function(modules) { // webpackBootstrap
142139
throw new Error('Tabs must contain at least one Tabs.Panel');
143140
}
144141

145-
if (!Array.isArray(this.props.children)) {
146-
this.props.children = [this.props.children];
147-
}
142+
var $menuItems = React.Children
143+
.map(this.props.children, function($panel, index) {
144+
if (typeof $panel === 'function') {
145+
$panel = $panel()
146+
}
148147

149-
var $menuItems = this.props.children
150-
.map(function($panel) {return typeof $panel === 'function' ? $panel() : $panel;})
151-
.filter(function($panel) {return $panel;})
152-
.map(function($panel, index) {
153148
var ref = ("tab-menu-" + (index + 1));
154149
var title = $panel.props.title;
150+
155151
var classes = classNames(
156152
'tabs-menu-item',
157153
this.state.tabActive === (index + 1) && 'is-active'
@@ -187,11 +183,11 @@ return /******/ (function(modules) { // webpackBootstrap
187183
Tabs.Panel = React.createClass({
188184
displayName: 'Panel',
189185
propTypes: {
190-
title: React.PropTypes.string.isRequired,
191-
children: React.PropTypes.oneOfType([
192-
React.PropTypes.array,
186+
title: React.PropTypes.oneOfType([
187+
React.PropTypes.string,
193188
React.PropTypes.element
194-
]).isRequired
189+
]).isRequired,
190+
children: React.PropTypes.node.isRequired
195191
},
196192
render:function () {
197193
return React.createElement("div", null, this.props.children);
@@ -252,3 +248,4 @@ return /******/ (function(modules) { // webpackBootstrap
252248
/***/ }
253249
/******/ ])
254250
});
251+
;

dist/react-simpletabs.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)