From 6267ed5a0cfcedefa08bc9cd943522e3ccf4a83c Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Fri, 16 Sep 2016 09:23:22 +0200 Subject: [PATCH] [RaisedButton] Add a buttonStyle property I think that we should aim for having a customizability point for every inner element. Closes #5182. --- src/RaisedButton/RaisedButton.js | 10 ++++++++-- src/RaisedButton/RaisedButton.spec.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/RaisedButton/RaisedButton.js b/src/RaisedButton/RaisedButton.js index ea92cf5500ca7e..eb40d106338102 100644 --- a/src/RaisedButton/RaisedButton.js +++ b/src/RaisedButton/RaisedButton.js @@ -120,6 +120,10 @@ class RaisedButton extends Component { * (use `disabledBackgroundColor` for this). */ backgroundColor: PropTypes.string, + /** + * Override the inline-styles of the button element. + */ + buttonStyle: PropTypes.object, /** * The content of the button. * If a label is provided via the `label` prop, the text within the label @@ -327,6 +331,7 @@ class RaisedButton extends Component { render() { const { backgroundColor, // eslint-disable-line no-unused-vars + buttonStyle, children, className, disabled, @@ -341,6 +346,7 @@ class RaisedButton extends Component { primary, // eslint-disable-line no-unused-vars rippleStyle, secondary, // eslint-disable-line no-unused-vars + style, ...other, } = this.props; @@ -386,7 +392,7 @@ class RaisedButton extends Component { return ( ', () => { }); }); - describe('props: icon', () => { + describe('prop: icon', () => { it('should keep the style set on the icon', () => { const wrapper = shallowWithContext( } />