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

[Avatar] Remove style-propable mixin #3235

Merged
merged 1 commit into from
Feb 8, 2016

Conversation

newoga
Copy link
Contributor

@newoga newoga commented Feb 8, 2016

No description provided.

} = state.muiTheme;

const styles = {
root: Object.assign({
Copy link
Member

Choose a reason for hiding this comment

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

This is a ternary vampire, sucking the life out of readability 😆 😆

root: {
  color,
  backgroundColor,
  userSelect: 'none',
  display: 'inline-block',
  textAlign: 'center',
  lineHeight: `${size}px`,
  fontSize: size / 2 + 4,
  borderRadius: '50%',
  border: src ? `solid 1px ${avatar.borderColor}` : undefined,
  height: src ? size - 2 : size,
  width: src ? size - 2 : size,
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, thank you for your patience with me, good sir. 😆

Copy link
Member

Choose a reason for hiding this comment

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

no worries, programming is a playful job. It always tickles you to write clever code. We've all been there 😆 😆

@newoga newoga added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed PR: Needs Review labels Feb 8, 2016
@newoga
Copy link
Contributor Author

newoga commented Feb 8, 2016

@newoga newoga added PR: Needs Review and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 8, 2016
@alitaheri
Copy link
Member

All good 👍 👍


if (borderColor) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add this logic back 😁?
I'm using the muiTheme like this:

  avatar: {
    borderColor: null,
  },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good catch, I don't know how I missed that borderColor was part of the condition for applying those styles. Thanks!

@newoga
Copy link
Contributor Author

newoga commented Feb 8, 2016

  • Fixed regression where styles were improperly being applied when borderColor in theme was not defined (comment)

@oliviertassinari
Copy link
Member

@newoga Thanks! It's time to sleep 😴.

oliviertassinari added a commit that referenced this pull request Feb 8, 2016
[Avatar] Remove style-propable mixin
@oliviertassinari oliviertassinari merged commit 61014dc into mui:master Feb 8, 2016
@newoga
Copy link
Contributor Author

newoga commented Feb 8, 2016

@newoga Thanks! It's time to sleep 😴.

Haha, thanks!

@newoga newoga deleted the #2852/avatar branch February 8, 2016 16:24
@zannager zannager added the component: avatar 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: avatar 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