Conversation
Ooh, conceptually I like this! The downside is that the code needs to be structured in a way that react-docgen understand. In flowtype there's a couple of different ways of creating combination types. type Props = ViewProps | ButtonProps | AndroidProps | IOSProps.@ani4aniket could you check if any other components use this method, or some alternative, and if react-docgen works with it. I really like it, we just don't want someone to break docs accidentally by doing a refactoring! (I'll do a code review later, now on a call) |
|
Yes, I have verified and tested this in many components, in every component the inherited props are parsed as |
jevakallio
left a comment
There was a problem hiding this comment.
LGTM!
Let's open a PR to upstream!
416964c to
552cbce
Compare
Fixes #57
Summary
@inheritsannotations to show inherited props asinheritedPropsis already getting parsed ascomposes(Array of string) by react-docgen. We can collectively store links of all the inheritedProps into a file and then outsource their exposed URL depending on the value ofcomposescolorprop which is repeated multiple times in themdfile.