@@ -6,10 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
7
7
var _createClass = function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ( ) ;
8
8
9
- var _style = require ( 'styled-jsx/style' ) ;
10
-
11
- var _style2 = _interopRequireDefault ( _style ) ;
12
-
13
9
var _react = require ( 'react' ) ;
14
10
15
11
var _react2 = _interopRequireDefault ( _react ) ;
@@ -38,11 +34,11 @@ var TabNavigation = function (_React$Component) {
38
34
39
35
var _this = _possibleConstructorReturn ( this , ( TabNavigation . __proto__ || Object . getPrototypeOf ( TabNavigation ) ) . call ( this , props ) ) ;
40
36
41
- var tabs = _this . props . children . map ( function ( el ) {
37
+ var tabs = _this . props && _this . props . children instanceof Array && _this . props . children . map ( function ( el ) {
42
38
return el . props . tab ;
43
39
} ) ;
44
40
_this . state = {
45
- currentTab : tabs [ 0 ] . name ,
41
+ currentTab : tabs && tabs [ 0 ] && tabs [ 0 ] . name ,
46
42
tabs : tabs || [ ]
47
43
} ;
48
44
return _this ;
@@ -64,14 +60,10 @@ var TabNavigation = function (_React$Component) {
64
60
65
61
return _react2 . default . createElement (
66
62
'div' ,
67
- {
68
- className : 'jsx-3106214966'
69
- } ,
63
+ null ,
70
64
_react2 . default . createElement (
71
65
'div' ,
72
- {
73
- className : 'jsx-3106214966' + ' ' + 'flex flex-row justify-center'
74
- } ,
66
+ { className : 'flex flex-row justify-center' } ,
75
67
tabs . map ( function ( tab ) {
76
68
return _react2 . default . createElement ( _NavButton2 . default , {
77
69
onClick : _this2 . buttonClickHandler . bind ( _this2 , tab . name ) ,
@@ -84,10 +76,6 @@ var TabNavigation = function (_React$Component) {
84
76
) ,
85
77
( 0 , _arrayPrototype2 . default ) ( this . props . children , function ( el ) {
86
78
return el . props . tab . name === currentTab ;
87
- } ) ,
88
- _react2 . default . createElement ( _style2 . default , {
89
- styleId : '3106214966' ,
90
- css : ''
91
79
} )
92
80
) ;
93
81
}
0 commit comments