@@ -61,8 +61,13 @@ currentButton:this.getCurrentButton(nextProps)});
6161nextProps ) {
6262if ( this . props . image !== nextProps . image ) return true ;
6363if ( this . props . text !== nextProps . text ) return true ;
64+ if ( this . props . disabled !== nextProps . disabled ) return true ;
6465if ( this . props . states && this . props . buttonState !== nextProps . buttonState ) return true ;
6566if ( this . props . states && this . props . states [ this . props . buttonState ] . progressFill ) return true ;
67+ if (
68+ this . props . states &&
69+ this . props . states [ this . props . buttonState ] . disabled !== nextProps . states [ nextProps . buttonState ] . disabled )
70+ return true ;
6671return false ;
6772} } , { key :'getCurrentButton' , value :function getCurrentButton (
6873
@@ -105,7 +110,7 @@ progressWidth:this.props.progressWidth,
105110progressTintColor :this . props . progressTintColor ,
106111progressBackgroundColor :this . props . progressBackgroundColor ,
107112progressStyle :this . props . progressStyle ,
108- textInsideProgress :this . props . textInsideProgress , __source :{ fileName :_jsxFileName , lineNumber :89 } } ) ;
113+ textInsideProgress :this . props . textInsideProgress , __source :{ fileName :_jsxFileName , lineNumber :94 } } ) ;
109114
110115
111116} else {
@@ -114,7 +119,7 @@ _react2.default.createElement(_Button2.default,{
114119textStyle :this . props . textStyle || textStyle ,
115120imageStyle :this . props . imageStyle || imageStyle ,
116121text :this . props . text ,
117- image :this . props . image , __source :{ fileName :_jsxFileName , lineNumber :113 } } ) ;
122+ image :this . props . image , __source :{ fileName :_jsxFileName , lineNumber :118 } } ) ;
118123
119124
120125}
@@ -137,6 +142,9 @@ var buttonWidth=this.getProp('width');
137142var buttonStyle = this . getProp ( 'buttonStyle' ) ;
138143var shape = this . getProp ( 'shape' ) ;
139144var onPress = this . getProp ( 'onPress' ) ;
145+ var disabledStyle = disabled ?
146+ { opacity :disabledOpacity } :
147+ null ;
140148
141149var shapeStyle = void 0 ;
142150if ( [ 'round' , 'circle' ] . includes ( shape ) ) {
@@ -153,15 +161,15 @@ start:disabled?disabledGradientStart:gradientStart,
153161end :disabled ?disabledGradientEnd :gradientEnd ,
154162colors :backgroundColors ,
155163collapsable :false ,
156- style :[ styles . button , shapeStyle , buttonStyle ] , __source :{ fileName :_jsxFileName , lineNumber :151 } } ,
164+ style :[ styles . button , shapeStyle , buttonStyle , disabledStyle ] , __source :{ fileName :_jsxFileName , lineNumber :159 } } ,
157165
158166this . renderButton ( { textStyle :styles . text } ) ) ;
159167
160168
161169} else {
162170var border = type === 'border' && styles . border ;
163171content =
164- _react2 . default . createElement ( _reactNative . View , { style :[ styles . button , border , shapeStyle , buttonStyle ] , __source :{ fileName :_jsxFileName , lineNumber :164 } } ,
172+ _react2 . default . createElement ( _reactNative . View , { style :[ styles . button , border , shapeStyle , buttonStyle , disabledStyle ] , __source :{ fileName :_jsxFileName , lineNumber :172 } } ,
165173this . renderButton ( { textStyle :styles . secondaryText } ) ) ;
166174
167175
@@ -177,10 +185,9 @@ style:[
177185styles . container ,
178186{
179187width :buttonWidth ,
180- height :buttonHeight ,
181- opacity :disabled ?disabledOpacity :1 } ,
188+ height :buttonHeight } ,
182189
183- style ] , __source :{ fileName :_jsxFileName , lineNumber :171 } } ,
190+ style ] , __source :{ fileName :_jsxFileName , lineNumber :179 } } ,
184191
185192
186193content ) ) ;
0 commit comments