Styling of checkbox does not reflect disabled state when color="default"
@siriwatknp is already working on this.
Since Apr 3, 2023.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/great-montalcini-mm1rle?file=/demo.tsx
Steps:
- Add a
Checkboxcomponent and give it the propscolor="default"anddisabled - Note that the checkbox does not have any of the standard visual cues for a disabled element.
Current behavior 😯
A checkbox with the props color="default" and disabled does not have any of the standard visual cues for a disabled element.
It actually looks almost exactly the same as standard "secondary" non-disabled component, which is pretty confusing.
Expected behavior 🤔
The checkbox should have the same visual cues for being disabled that any other color variation would have.
Context 🔦
This might be a quirk around the intention of color='default' that I don't fully understand... but I wasn't able to find any documentation that made this seem like expected behavior. The term "default" here has caused confusion for my team between default-as-result-without-props and default-as-a-color.
Your environment 🌎
npx @mui/envinfo
System:
OS: macOS 13.2.1
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.1.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Browsers:
Chrome: 111.0.5563.146
Edge: Not Found
Firefox: 111.0.1
Safari: 16.3
npmPackages:
@emotion/react: 11.10.5
@emotion/styled: 11.10.5
@mui/icons-material: 5.11.0
@mui/lab: 5.0.0-alpha.118
@mui/material: 5.11.15
@mui/system: 5.11.9
@mui/utils: 5.11.9
@mui/x-date-pickers: 5.0.18
@types/react: 17.0.53
react: 17.0.2
react-dom: 17.0.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.