[docs] Improve iOS style switch demo
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
When the iOS styled switch is set to disable and the switch is turned on, it still displays the green colour and does not look like it is disabled. But works fine when the switch is set to false.
Expected Behavior 🤔
It is expected to turn its colour to grey when it is disabled and the state is set to true like the rest of the switches and should look like a disabled switch.
Steps to Reproduce 🕹
Steps:
- Open the codesandbox
- Go to line number 141 and in the iOS switch add another attribute i.e. disabled.
- Save it and you could see that the iOS switch is still green coloured rather than turning into grey on disabled.
Context 🔦
iOS switch is used in many projects and is also used in disabled mode and do not provide a user-friendly experience when it still looks like enabled when it is disabled.
Your Environment 🌎
`npx @material-ui/envinfo`
It was used in Google Chrome and Microsoft Edge.
Output from `npx @material-ui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
UISwitch | Apple Developer Documentation
Present a switch control as a Mac-style checkbox when your app runs in the Mac user interface idiom ... The title displayed next...
Read more >Flutter for iOS developers
Learn how to apply iOS developer knowledge when building Flutter apps. ... How is react-style, or declarative, programming different from the traditional ...
Read more >Switch - NativeScript Docs
The Switch component represents control, which can have two states('true', 'false'). The user can toggle the components value. The modules allow setting and ......
Read more >switch - JavaScript - MDN Web Docs - Mozilla
The default clause of a switch statement will be jumped to if no case matches the ... JavaScript Demo: Statement - Switch ......
Read more >Cloud-based maps styling | Maps Customization Guide
Android; iOS; JavaScript; Try Sample; Maps Static API ... Google Maps Platform offers Cloud-based maps styling features that make it easy to style, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
However, there is a bug in the nominal use case:
I would propose this diff to match the iOS spec:
Great! 💯