@@ -43,7 +43,7 @@ var SwipeoutBtn = (0, _createReactClass2.default)({
4343 color : _propTypes2 . default . string ,
4444 component : _propTypes2 . default . node ,
4545 onPress : _propTypes2 . default . func ,
46- text : _propTypes2 . default . string ,
46+ text : _propTypes2 . default . node ,
4747 type : _propTypes2 . default . string ,
4848 underlayColor : _propTypes2 . default . string
4949 } ,
@@ -87,10 +87,10 @@ var SwipeoutBtn = (0, _createReactClass2.default)({
8787 width : btn . width
8888 } ] ) ;
8989
90- var styleSwipeoutBtnText = [ _styles2 . default . swipeoutBtnText ] ;
90+ var styleSwipeoutBtnText = _extends ( { } , _styles2 . default . swipeoutBtnText ) ;
9191
9292 // apply text color
93- if ( btn . color ) styleSwipeoutBtnText . push ( [ { color : btn . color } ] ) ;
93+ if ( btn . color ) styleSwipeoutBtnText = _extends ( { } , styleSwipeoutBtnText , { color : btn . color } ) ;
9494
9595 return _react2 . default . createElement (
9696 _NativeButton2 . default ,
@@ -338,9 +338,11 @@ var Swipeout = (0, _createReactClass2.default)({
338338 var _this3 = this ;
339339
340340 this . refs . swipeoutContent . measure ( function ( ox , oy , width , height ) {
341+ var btnWidth = _this3 . props . buttonWidth || width / 5 ;
342+
341343 _this3 . setState ( {
342- btnWidth : width / 5 ,
343- btnsRightWidth : _this3 . props . right ? width / 5 * _this3 . props . right . length : 0
344+ btnWidth : btnWidth ,
345+ btnsRightWidth : _this3 . props . right ? btnWidth * _this3 . props . right . length : 0
344346 } , function ( ) {
345347 _this3 . _tweenContent ( 'contentPos' , - _this3 . state . btnsRightWidth ) ;
346348 _this3 . _callOnOpen ( ) ;
@@ -358,9 +360,11 @@ var Swipeout = (0, _createReactClass2.default)({
358360 var _this4 = this ;
359361
360362 this . refs . swipeoutContent . measure ( function ( ox , oy , width , height ) {
363+ var btnWidth = _this4 . props . buttonWidth || width / 5 ;
364+
361365 _this4 . setState ( {
362- btnWidth : width / 5 ,
363- btnsLeftWidth : _this4 . props . left ? width / 5 * _this4 . props . left . length : 0
366+ btnWidth : btnWidth ,
367+ btnsLeftWidth : _this4 . props . left ? btnWidth * _this4 . props . left . length : 0
364368 } , function ( ) {
365369 _this4 . _tweenContent ( 'contentPos' , _this4 . state . btnsLeftWidth ) ;
366370 _this4 . _callOnOpen ( ) ;
@@ -401,7 +405,7 @@ var Swipeout = (0, _createReactClass2.default)({
401405 } ;
402406 var styleContentPos = {
403407 content : {
404- transform : [ { translateX : this . _rubberBandEasing ( posX , limit ) } ] ,
408+ transform : [ { translateX : this . _rubberBandEasing ( posX , limit ) } ]
405409 }
406410 } ;
407411
0 commit comments