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] “Proxy” components don’t include proxied props in documentation #7981

Closed
yuchi opened this issue Aug 31, 2017 · 5 comments
Closed
Labels
docs Improvements or additions to the documentation

Comments

@yuchi
Copy link
Contributor

yuchi commented Aug 31, 2017

Description

When looking at the documentation of a “Proxy” component (a component which “just” passes props to another one exploiting its functionalities) “inherited” proxied props are not listed.

Example

A clear example is MenuItem which looks like it doesn’t supports a disabled prop, while actually it does (since it comes from ListItem).

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Aug 31, 2017
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 31, 2017

I have forgotten to add // @inheritedComponent ListItem for the MenuItem.js.
Do you want to add it? This automatically adds an ## Inheritance paragraph in the docs of the API.

@yuchi
Copy link
Contributor Author

yuchi commented Aug 31, 2017

Hold my beer™.

@oliviertassinari
Copy link
Member

Also, If you have a better wording in mind for the documentation, let us know!

yuchi added a commit to yuchi/material-ui that referenced this issue Aug 31, 2017
yuchi added a commit to yuchi/material-ui that referenced this issue Aug 31, 2017
yuchi added a commit to yuchi/material-ui that referenced this issue Aug 31, 2017
@yuchi
Copy link
Contributor Author

yuchi commented Aug 31, 2017

(Sorry for so many tentatives in getting the commit [namespace] right 😅 )

Also, If you have a better wording in mind for the documentation, let us know!

I believe having the list of props directly in place (along side the reference to the inherited component) would be easier to understand.

@oliviertassinari
Copy link
Member

I believe having the list of props directly in place (along side the reference to the inherited component) would be easier to understand.

It was simpler to implement this way. For anyone else looking into this issue, here is an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants