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

[typescript] Can't pass partial BackdropProps to Modal component #10146

Closed
ianschmitz opened this issue Feb 2, 2018 · 2 comments
Closed

[typescript] Can't pass partial BackdropProps to Modal component #10146

ianschmitz opened this issue Feb 2, 2018 · 2 comments
Labels
component: modal This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process. typescript

Comments

@ianschmitz
Copy link
Contributor

During the revamp in #9613, the various Modal Backdrop props were consolidated into BackdropProps. This is a great improvement, however the TypeScript declaration file specifies BackdropProps?: BackdropProps in the Modal props. This becomes an issue since BackdropProps has a required open prop, which makes it a little clunky to use from the context of a Modal component.

I propose we change Modal.d.ts to BackdropProps?: Partial<BackdropProps>.

Tech Version
Material-UI 1.0.0-beta.31
@oliviertassinari
Copy link
Member

I propose we change Modal.d.ts to BackdropProps?: Partial.

@ianschmitz I think that we should be using this pattern everywhere. Yes please. Let's change it! 🙏

@oliviertassinari oliviertassinari added the good first issue Great for first contributions. Enable to learn the contribution process. label Feb 3, 2018
@ianschmitz
Copy link
Contributor Author

ianschmitz commented Feb 5, 2018

I'm on it 👍

@oliviertassinari oliviertassinari added the component: modal This is the name of the generic UI component, not the React module! label Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process. typescript
Projects
None yet
Development

No branches or pull requests

2 participants