Skip to content

Commit

Permalink
[RaisedButton] Add explicit height property to overlay, fixes mui#3815
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarks committed Apr 19, 2016
1 parent f34ddf0 commit ceda73d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/RaisedButton/RaisedButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ function getStyles(props, context, state) {
}
}

const buttonHeight = style && style.height || `${button.height}px`;

return {
root: {
display: 'inline-block',
minWidth: fullWidth ? '100%' : button.minWidth,
height: button.height,
height: buttonHeight,
transition: transitions.easeOut(),
},
container: {
lineHeight: buttonHeight,
position: 'relative',
height: '100%',
width: '100%',
Expand All @@ -85,16 +88,15 @@ function getStyles(props, context, state) {
userSelect: 'none',
paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess,
paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess,
lineHeight: style && style.height || `${button.height}px`,
color: labelColor,
},
icon: {
lineHeight: style && style.height || `${button.height}px`,
verticalAlign: 'middle',
marginLeft: label && labelPosition !== 'before' ? 12 : 0,
marginRight: label && labelPosition === 'before' ? 12 : 0,
},
overlay: {
height: buttonHeight,
backgroundColor: (state.keyboardFocused || state.hovered) && !disabled &&
fade(labelColor, amount),
transition: transitions.easeOut(),
Expand Down

0 comments on commit ceda73d

Please sign in to comment.