From 9a514e08bc6091f8352dd35ce8a643e9ea145250 Mon Sep 17 00:00:00 2001 From: Daniel Weinmann Date: Sun, 7 Feb 2016 16:46:21 -0200 Subject: [PATCH 1/2] Adds optional disabledStyle prop --- Button.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Button.js b/Button.js index 3a262dd..ad2a794 100644 --- a/Button.js +++ b/Button.js @@ -17,6 +17,7 @@ var Button = React.createClass({ propTypes: Object.assign({}, { textStyle: Text.propTypes.style, + disabledStyle: Text.propTypes.style, children: PropTypes.string.isRequired, isLoading: PropTypes.bool, isDisabled: PropTypes.bool, @@ -80,7 +81,7 @@ var Button = React.createClass({ render: function () { if (this.props.isDisabled === true || this.props.isLoading === true) { return ( - + {this._renderInnerText()} ); From f2408d6ef27b944e92f285ad005371fc3b62c850 Mon Sep 17 00:00:00 2001 From: Daniel Weinmann Date: Sun, 7 Feb 2016 16:51:44 -0200 Subject: [PATCH 2/2] Adds disabledStyle to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4617d01..1c3583d 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ and disable it to prevent accidental taps. | ``onPressOut`` | ``func`` | Function to execute when the ``onPressOut`` event is triggered. | | ``onLongPress`` | ``func`` | Function to execute when the ``onLongPress`` event is triggered. | | ``textStyle`` | ``TextStylePropTypes`` | The StyleSheet to apply to the inner button text. | +| ``disabledStyle`` | ``TextStylePropTypes`` | The StyleSheet to apply when disabled. | | ``children`` | ``string`` | The ``string`` to render as the text button. | | ``isLoading`` | ``bool`` | Renders an inactive state dimmed button with a spinner if ``true``. | | ``isDisabled`` | ``bool`` | Renders an inactive state dimmed button if ``true``. |