Skip to content

Commit 44c833b

Browse files
committed
Prepare for publishing
1 parent 7a9e9d6 commit 44c833b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lib/components/Carousel.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ var Carousel = function (_Component) {
598598
return _react2.default.createElement(
599599
'li',
600600
slideProps,
601-
item
601+
_this2.props.renderItem(item, { isSelected: index === _this2.state.selectedItem })
602602
);
603603
});
604604
}
@@ -649,7 +649,7 @@ var Carousel = function (_Component) {
649649
thumbWidth: this.props.thumbWidth,
650650
labels: this.props.labels
651651
},
652-
this.props.children
652+
this.props.renderThumbs(this.props.children)
653653
);
654654
}
655655
}, {
@@ -815,7 +815,9 @@ Carousel.propTypes = {
815815
onSwipeMove: _propTypes2.default.func,
816816
renderArrowPrev: _propTypes2.default.func,
817817
renderArrowNext: _propTypes2.default.func,
818-
renderIndicator: _propTypes2.default.func
818+
renderIndicator: _propTypes2.default.func,
819+
renderItem: _propTypes2.default.func,
820+
renderThumbs: _propTypes2.default.func
819821
};
820822
Carousel.defaultProps = {
821823
showIndicators: true,
@@ -867,6 +869,14 @@ Carousel.defaultProps = {
867869
tabIndex: 0,
868870
'aria-label': label + ' ' + (index + 1)
869871
});
872+
},
873+
renderItem: function renderItem(item, _ref) {
874+
var isSelected = _ref.isSelected;
875+
876+
return item;
877+
},
878+
renderThumbs: function renderThumbs(children) {
879+
return children;
870880
}
871881
};
872882
exports.default = Carousel;

0 commit comments

Comments
 (0)