20
20
return /******/ ( function ( modules ) { // webpackBootstrap
21
21
/******/ // The module cache
22
22
/******/ var installedModules = { } ;
23
- /******/
23
+
24
24
/******/ // The require function
25
25
/******/ function __webpack_require__ ( moduleId ) {
26
- /******/
26
+
27
27
/******/ // Check if module is in cache
28
28
/******/ if ( installedModules [ moduleId ] )
29
29
/******/ return installedModules [ moduleId ] . exports ;
30
- /******/
30
+
31
31
/******/ // Create a new module (and put it into the cache)
32
32
/******/ var module = installedModules [ moduleId ] = {
33
33
/******/ exports : { } ,
34
34
/******/ id : moduleId ,
35
35
/******/ loaded : false
36
36
/******/ } ;
37
- /******/
37
+
38
38
/******/ // Execute the module function
39
39
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , __webpack_require__ ) ;
40
- /******/
40
+
41
41
/******/ // Flag the module as loaded
42
42
/******/ module . loaded = true ;
43
- /******/
43
+
44
44
/******/ // Return the exports of the module
45
45
/******/ return module . exports ;
46
46
/******/ }
47
- /******/
48
- /******/
47
+
48
+
49
49
/******/ // expose the modules object (__webpack_modules__)
50
50
/******/ __webpack_require__ . m = modules ;
51
- /******/
51
+
52
52
/******/ // expose the module cache
53
53
/******/ __webpack_require__ . c = installedModules ;
54
- /******/
54
+
55
55
/******/ // __webpack_public_path__
56
56
/******/ __webpack_require__ . p = "" ;
57
- /******/
57
+
58
58
/******/ // Load entry module and return exports
59
59
/******/ return __webpack_require__ ( 0 ) ;
60
60
/******/ } )
@@ -84,10 +84,7 @@ return /******/ (function(modules) { // webpackBootstrap
84
84
onMount : React . PropTypes . func ,
85
85
onBeforeChange : React . PropTypes . func ,
86
86
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
91
88
} ,
92
89
getDefaultProps :function ( ) {
93
90
return { tabActive : 1 } ;
@@ -142,16 +139,15 @@ return /******/ (function(modules) { // webpackBootstrap
142
139
throw new Error ( 'Tabs must contain at least one Tabs.Panel' ) ;
143
140
}
144
141
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
+ }
148
147
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 ) {
153
148
var ref = ( "tab-menu-" + ( index + 1 ) ) ;
154
149
var title = $panel . props . title ;
150
+
155
151
var classes = classNames (
156
152
'tabs-menu-item' ,
157
153
this . state . tabActive === ( index + 1 ) && 'is-active'
@@ -187,11 +183,11 @@ return /******/ (function(modules) { // webpackBootstrap
187
183
Tabs . Panel = React . createClass ( {
188
184
displayName : 'Panel' ,
189
185
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 ,
193
188
React . PropTypes . element
194
- ] ) . isRequired
189
+ ] ) . isRequired ,
190
+ children : React . PropTypes . node . isRequired
195
191
} ,
196
192
render :function ( ) {
197
193
return React . createElement ( "div" , null , this . props . children ) ;
@@ -252,3 +248,4 @@ return /******/ (function(modules) { // webpackBootstrap
252
248
/***/ }
253
249
/******/ ] )
254
250
} ) ;
251
+ ;
0 commit comments