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

[DialogContent] Add divider prop type for TypeScript #15273

Merged
merged 3 commits into from
Apr 10, 2019

Conversation

sperry94
Copy link
Contributor

@sperry94 sperry94 commented Apr 9, 2019

This PR adds the TS demo for ConfirmationDialog. This was separated from the main PR (#15271) because more changes were required for this demo.

@mui-pr-bot
Copy link

mui-pr-bot commented Apr 9, 2019

No bundle size changes comparing 5bbf156...6ae88c7

Generated by 🚫 dangerJS against 6ae88c7

@eps1lon eps1lon self-requested a review April 9, 2019 08:07
@eps1lon eps1lon added docs Improvements or additions to the documentation typescript component: DialogContent bug 🐛 Something doesn't work labels Apr 9, 2019
@eps1lon eps1lon mentioned this pull request Apr 9, 2019
@eps1lon eps1lon changed the title [docs]: Adding TS demo for ConfirmationDialog [DialogContent] Add divider prop type for TypeScript Apr 9, 2019
@eps1lon eps1lon force-pushed the confirmationDialog-ts-docs branch 2 times, most recently from 57ca2c9 to 5d17486 Compare April 9, 2019 09:05
- use idiomatic gDSFP for hooks
- leverage classes API of the Dialog
@eps1lon eps1lon force-pushed the confirmationDialog-ts-docs branch from 5d17486 to 6ae88c7 Compare April 9, 2019 09:08
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.

I've reworked the styling approach to match the JS version.

I included some improvements the the runtime behavior:

  • use getDerivedStateFromProps pattern for hooks instead of props and state being out-of-sync
  • completely prefer props spread

@eps1lon eps1lon merged commit 3b084f6 into mui:next Apr 10, 2019
@eps1lon
Copy link
Member

eps1lon commented Apr 10, 2019

@sperry94 Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants