Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

feat: auto generate prop info - #147

Open
rkrishn7 wants to merge 1 commit into
masterfrom
feat/prop-info
Open

feat: auto generate prop info#147
rkrishn7 wants to merge 1 commit into
masterfrom
feat/prop-info

Conversation

@rkrishn7

Copy link
Copy Markdown

📃 Summary

Added react-docgen-typescript-loader and @storybook/addon-info to auto generate prop tables in storybook. This works with JS implementations but plays way nicer with TS components. For a good reference, check out Icon as it has already been converted.

📸 Screenshots

Screen Shot 2020-08-10 at 3 55 10 PM

@rkrishn7 rkrishn7 added dependencies Pull requests that update a dependency file enhancement New feature or request labels Aug 10, 2020

@albertovillalobos albertovillalobos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice very useful!

code looks legit

@alextranwork

Copy link
Copy Markdown
Contributor

Is this based on PropTypes?

@alextranwork

Copy link
Copy Markdown
Contributor

nm, its based on TS

@alextranwork alextranwork left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious how useful this is because vscode already provides typing documentation that covers the entire codebase in addition to components. So in the screenshot above, how do we see documentation on CSSProperties?

@rkrishn7

Copy link
Copy Markdown
Author

Curious how useful this is because vscode already provides typing documentation that covers the entire codebase in addition to components.

AFAIK vscode provides intellisense and definition peeking to aid with this, but personally I've found relying solely on that to be annoying. Whether it be our own properties or those inherited from styled-system, I think it's nice to have one centralized place for all of this.

So in the screenshot above, how do we see documentation on CSSProperties?

Assuming you're talking about styled-system props, we can see that information as well.

Screen Shot 2020-08-11 at 10 00 21 AM

@alextranwork

Copy link
Copy Markdown
Contributor

ok, lets give this a try

@rkrishn7

Copy link
Copy Markdown
Author

I'll hold off on merging this until this has been merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants