Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/RaisedButton/RaisedButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -327,6 +331,7 @@ class RaisedButton extends Component {
render() {
const {
backgroundColor, // eslint-disable-line no-unused-vars
buttonStyle,
children,
className,
disabled,
Expand All @@ -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;

Expand Down Expand Up @@ -386,15 +392,15 @@ class RaisedButton extends Component {
return (
<Paper
className={className}
style={Object.assign(styles.root, this.props.style)}
style={Object.assign(styles.root, style)}
zDepth={this.state.zDepth}
>
<EnhancedButton
{...other}
{...buttonEventHandlers}
ref="container"
disabled={disabled}
style={styles.button}
style={Object.assign(styles.button, buttonStyle)}
focusRippleColor={mergedRippleStyles.color}
touchRippleColor={mergedRippleStyles.color}
focusRippleOpacity={mergedRippleStyles.opacity}
Expand Down
2 changes: 1 addition & 1 deletion src/RaisedButton/RaisedButton.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('<RaisedButton />', () => {
});
});

describe('props: icon', () => {
describe('prop: icon', () => {
it('should keep the style set on the icon', () => {
const wrapper = shallowWithContext(
<RaisedButton icon={<ActionAndroid style={{foo: 'bar'}} />} />
Expand Down