Material-ui: [Proposal] [Selection Controls] Selection Control text should gray out if the disabled flag is turned on for <FormControl>

Created on 28 Mar 2018  路  4Comments  路  Source: mui-org/material-ui

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior


Selection Control text should gray out if the disabled flag is turned on for <FormControl>

Current Behavior


Selection Control text remains black even if disabled flag is turned on. The text color is just too dark for disabled state

Steps to Reproduce (for bugs)

  1. Go to https://material-ui-next.com/demos/selection-controls/
  2. Take a look at any disabled controls.

Context

In my project, I have several disabled controls. Ideally I want them to appear grayish when disabled.

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | beta.38 |
| React | 16.2.0 |
| browser | |
| etc | |

enhancement

Most helpful comment

After taking a closer look, it seems like the component is originally intended to function like @franklixuefei described. Working on a fix.

All 4 comments

FormControl has CSS API property for disabled state: https://material-ui-next.com/api/form-control-label/
Unfortunately any color assigned there will be overwritten by the typography class that gets assigned to the label span.

Material spec does not say anything about the disabled label color: https://material.io/components/web/catalog/input-controls/radio-buttons/

After taking a closer look, it seems like the component is originally intended to function like @franklixuefei described. Working on a fix.

@vkentta Thank you!

@franklixuefei happy to help :smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

finaiized picture finaiized  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments

chris-hinds picture chris-hinds  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

sys13 picture sys13  路  3Comments