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

Default values for props are not always extracted #155

Open
declan-warn opened this issue Jan 22, 2021 · 0 comments
Open

Default values for props are not always extracted #155

declan-warn opened this issue Jan 22, 2021 · 0 comments

Comments

@declan-warn
Copy link
Contributor

The default value for props does not always seem to get extracted by extract-react-types.

One place where this is very visible is https://atlassian.design/components/button/code which has no default value information (despite having default values for many of the props).

As @danieldelcore indicated on Slack this is likely because:

I suspect it only pulls defaults off a component from the Component.defaultProps property or via static defaultProps rather than destructured function args

It would be great if extract-react-types could support extracting default values for props that are defined through default values on destructured function args 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant