From 591ff752ebba5eb354b32ea825ec8b435efae70d Mon Sep 17 00:00:00 2001 From: M03M Date: Mon, 16 Mar 2015 10:04:10 -0500 Subject: [PATCH] Gave disabled prop priority when determining button styles. --- src/js/flat-button.jsx | 4 ++-- src/js/floating-action-button.jsx | 2 +- src/js/raised-button.jsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/flat-button.jsx b/src/js/flat-button.jsx index 834073afba41ee..e653846cec0470 100644 --- a/src/js/flat-button.jsx +++ b/src/js/flat-button.jsx @@ -25,8 +25,8 @@ var FlatButton = React.createClass({ ...other } = this.props; var classes = this.getClasses('mui-flat-button', { - 'mui-is-primary': primary, - 'mui-is-secondary': !primary && secondary + 'mui-is-primary': !this.props.disabled && primary, + 'mui-is-secondary': !this.props.disabled && !primary && secondary }); var children; diff --git a/src/js/floating-action-button.jsx b/src/js/floating-action-button.jsx index 75ec5f5c19385f..6986dad549978b 100644 --- a/src/js/floating-action-button.jsx +++ b/src/js/floating-action-button.jsx @@ -59,7 +59,7 @@ var RaisedButton = React.createClass({ ...other } = this.props; var classes = this.getClasses('mui-floating-action-button', { 'mui-is-mini': mini, - 'mui-is-secondary': secondary + 'mui-is-secondary': !this.props.disabled && secondary }); var icon; diff --git a/src/js/raised-button.jsx b/src/js/raised-button.jsx index bc640c0e8b2e04..2fdcb16fc49ab7 100644 --- a/src/js/raised-button.jsx +++ b/src/js/raised-button.jsx @@ -46,8 +46,8 @@ var RaisedButton = React.createClass({ secondary, ...other } = this.props; var classes = this.getClasses('mui-raised-button', { - 'mui-is-primary': primary, - 'mui-is-secondary': !primary && secondary + 'mui-is-primary': !this.props.disabled && primary, + 'mui-is-secondary': !this.props.disabled && !primary && secondary }); var children;