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

[docs] Add Typescript example for switch label position #16959

Conversation

nowNick
Copy link
Contributor

@nowNick nowNick commented Aug 10, 2019

tl;dr; -> I added Typescript example for Switch label position.

Hi!

I wanted to add Typescript example for label position with Switch component. However once I took a look at code it quickly turned out that there aren't necessarily any typings needed.

The reason for that was that the logic inside the component went a little bit further than just the label placement. That's why I decided to simplify it a little bit so that this demo only shows different ways of label placement and not the state management possibilities of <FormGroup> component.

I'm not sure if you find this helpful. If you'd like I could just revert my refactoring and simply add the typing for event handler.

@mui-pr-bot
Copy link

No bundle size changes comparing f2dbeca...6b9c8e5

Generated by 🚫 dangerJS against 6b9c8e5

@oliviertassinari oliviertassinari changed the title [docs][Switch][FormControlLabel] Add Typescript example [docs] Add Typescript example for switch label position Aug 10, 2019
@oliviertassinari oliviertassinari added component: switch This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation labels Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: switch This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants