Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IconButton] Remove style-propable mixin #3232

Merged
merged 1 commit into from
Feb 8, 2016

Conversation

newoga
Copy link
Contributor

@newoga newoga commented Feb 8, 2016

No description provided.

@@ -278,7 +271,7 @@ const IconButton = React.createClass({
<FontIcon
className={iconClassName}
hoverColor={disabled ? null : iconHoverColor}
style={this.mergeStyles(
style={Object.assign(
styles.icon,
disabled ? styles.disabled : {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it doesn't matter, but there's really no need to allocate an extra object for this

disabled && styles.disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find! I agree 👍

@newoga
Copy link
Contributor Author

newoga commented Feb 8, 2016

  • Cleaned up style argument that prevents unnecessary allocation (comment)

@alitaheri
Copy link
Member

All good 😄

@oliviertassinari
Copy link
Member

@newoga Thanks!

oliviertassinari added a commit that referenced this pull request Feb 8, 2016
[IconButton] Remove style-propable mixin
@oliviertassinari oliviertassinari merged commit 742ea23 into mui:master Feb 8, 2016
@newoga newoga deleted the #2852/icon-button branch February 8, 2016 09:06
@zannager zannager added the component: icon button This is the name of the generic UI component, not the React module! label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: icon button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants