-
Notifications
You must be signed in to change notification settings - Fork 406
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
Provide way to document complex props, types, or add examples for React components #659
Comments
👋 @joshblack am I correct in assuming this is a feature request for https://primer.style? If so, does it seem reasonable to assume the first step would be seeking design input on how to represent complex props/types there? Trying to figure out the best place to triage this to 🤔 |
@lesliecdubs definitely! Seems reasonable to me 👍 |
@mperrotti could you take a look at this and connect with @joshblack or would you like to bring this to Primer Patterns? |
@tallys - I'm already in touch with @joshblack about this. I don't think it needs a Primer patterns session. |
@mperrotti did you both come to an agreement here on how to move forward? Noticed this one is over a year old, happy to close - let me know. |
We have a solution. Closing. |
For DataTable, there are certain props where it would be great to provide additional documentation for them as the type itself may be too complicated to show inline. For example, columns is currently only represented as
Array<Column<Data>>
and it would be helpful to document the interior type,Column
, along with its descriptions of fields. For an overview of this type, visit the code here.One alternative could be to allow for extension of the specific prop sections in order to further document a component and it's props. This shows up in sites like:
Or it could show up as a popup similar to sites like:
Finally, additional information could live in the description for the prop (however this would mean descriptions would be longer as in: https://mui.com/material-ui/api/pagination/)
The text was updated successfully, but these errors were encountered: