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

[TimeDisplay] Inherit text color from theme #5816

Merged
merged 3 commits into from Dec 24, 2016
Merged

[TimeDisplay] Inherit text color from theme #5816

merged 3 commits into from Dec 24, 2016

Conversation

remon-nashid
Copy link

@remon-nashid remon-nashid commented Dec 23, 2016

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

TimeDisplay component has text color fixed to 'white' instead of inheriting it from the theme. I looked at DatePicker component to see how it works, I found out that, unlike TimePicker, it's using datePicket.textColor from theme to set text color. This pull request brings TimePicker on a par with DatePicker.

@@ -70,7 +70,7 @@ class TimeDisplay extends Component {
borderTopLeftRadius: 2,
borderTopRightRadius: 2,
backgroundColor: timePicker.headerColor,
color: 'white',
color: timePicker.textColor,
Copy link
Member

Choose a reason for hiding this comment

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

That's a breaking change. We can't merge like that.

timePicker.textColor = palette.accent3Color

I think that we should change that line with palette.textColor
https://github.com/callemall/material-ui/blob/master/src/styles/getMuiTheme.js#L296

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @oliviertassinari! That makes a lot of sense. I'll update the PR accordingly.

@oliviertassinari oliviertassinari 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 Dec 23, 2016
@@ -293,7 +293,7 @@ export default function getMuiTheme(muiTheme, ...more) {
},
timePicker: {
color: palette.alternateTextColor,
textColor: palette.accent3Color,
textColor: palette.textColor,
Copy link
Member

Choose a reason for hiding this comment

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

My bad, I would rather be using alternateTextColor as in the datePicker.

Copy link
Author

Choose a reason for hiding this comment

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

No worries. Here you go.

@remon-nashid
Copy link
Author

Hi @oliviertassinari, thanks for your prompt feedback! Let me know what I can do to move this forward.

@oliviertassinari oliviertassinari added PR: Review Accepted and removed PR: Needs Review PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Dec 24, 2016
@oliviertassinari oliviertassinari merged commit 33d4237 into mui:master Dec 24, 2016
@oliviertassinari oliviertassinari added the component: time picker This is the name of the generic UI component, not the React module! label Dec 24, 2016
@oliviertassinari oliviertassinari changed the title [TimePicker -> TimeDisplay]: Inherit text color from theme [TimeDisplay] Inherit text color from theme Dec 24, 2016
@oliviertassinari
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: time picker 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.

None yet

3 participants