Material-ui: FormControlLabel doesn't use the text color from the theme

Created on 22 Jul 2017  路  6Comments  路  Source: mui-org/material-ui

Case in point:
sans titre

My code:

<FormControlLabel
   control={<Switch checked={contact.privacyHidden} onChange={::this.handlePrivacyChange}/>}
   label="Hidden"
/>

Versions

  • Material-UI: 1.0.0-alpha.22
enhancement good first issue

Most helpful comment

I see, thank you.

I got confused because Typography, Button ... do get the text color from the theme.

All 6 comments

The color is inherited. I don't think that we should be opinionated on what's the right color should be. I would rather see the parent component setting a color. The UI will end-up more consistent.

I see, thank you.

I got confused because Typography, Button ... do get the text color from the theme.

Maybe we should document the selection labels with a wrapping Typography.

Or move it to the implementation. I don't know, want to see more feedback before changing it.

Maybe an in-between solution would be to expose a color property as Button do that default to 'inherit'. The default value can be changed later after some feedback.

Let's reopen, my intuition would be that we need to have a Typography component under the hood and an option to disable it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pola88 picture pola88  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments

reflog picture reflog  路  3Comments

ghost picture ghost  路  3Comments