File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ var Button = React.createClass({
1717 propTypes : Object . assign ( { } ,
1818 {
1919 textStyle : Text . propTypes . style ,
20+ disabledStyle : Text . propTypes . style ,
2021 children : PropTypes . string . isRequired ,
2122 isLoading : PropTypes . bool ,
2223 isDisabled : PropTypes . bool ,
@@ -80,7 +81,7 @@ var Button = React.createClass({
8081 render : function ( ) {
8182 if ( this . props . isDisabled === true || this . props . isLoading === true ) {
8283 return (
83- < View style = { [ styles . button , this . props . style , styles . opacity ] } >
84+ < View style = { [ styles . button , this . props . style , ( this . props . disabledStyle || styles . opacity ) ] } >
8485 { this . _renderInnerText ( ) }
8586 </ View >
8687 ) ;
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ and disable it to prevent accidental taps.
4747| `` onPressOut `` | `` func `` | Function to execute when the `` onPressOut `` event is triggered. |
4848| `` onLongPress `` | `` func `` | Function to execute when the `` onLongPress `` event is triggered. |
4949| `` textStyle `` | `` TextStylePropTypes `` | The StyleSheet to apply to the inner button text. |
50+ | `` disabledStyle `` | `` TextStylePropTypes `` | The StyleSheet to apply when disabled. |
5051| `` children `` | `` string `` | The `` string `` to render as the text button. |
5152| `` isLoading `` | `` bool `` | Renders an inactive state dimmed button with a spinner if `` true `` . |
5253| `` isDisabled `` | `` bool `` | Renders an inactive state dimmed button if `` true `` . |
You can’t perform that action at this time.
0 commit comments