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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Reorder and rename "enforce value" ToggleButton demo #27678

Merged
merged 2 commits into from Aug 11, 2021

Conversation

LorenzHenk
Copy link

@LorenzHenk LorenzHenk commented Aug 10, 2021

In this example the order of the handle functions is not the same as the order of the rendered components.

Some of my colleagues (myself included) trip over this every now and then, so I decided to change it 馃槃

(I've added this example in the first place, so it's my fault it's out of order anyway 馃榿)

I've also used the chance to do a bit of cleanup:

  • replace the Grid wrapper with a Stack
  • rename "format" to "device", so the demo is simpler to understand

Before:

image

After:

image

@mui-pr-bot
Copy link

mui-pr-bot commented Aug 10, 2021

No bundle size changes (experimental)

Generated by 馃毇 dangerJS against a804e25

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall direction looks good, thanks. Could you fix the issues reported by test_lint and test_types?

@eps1lon eps1lon changed the title [docs][ToggleButton] Reorder and rename enforce value demo [docs] Reorder and rename "enforce value" ToggleButton demo Aug 10, 2021
@eps1lon eps1lon added component: toggle button This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation labels Aug 10, 2021
@LorenzHenk
Copy link
Author

LorenzHenk commented Aug 10, 2021

@eps1lon done 馃檪

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks way better, thanks!

@eps1lon eps1lon merged commit f8d2cd4 into mui:next Aug 11, 2021
@LorenzHenk LorenzHenk deleted the reorder-example-code branch August 11, 2021 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toggle button 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