Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

defaultProps as variable #68

Open
tiagoporto opened this issue Nov 8, 2019 · 0 comments
Open

defaultProps as variable #68

tiagoporto opened this issue Nov 8, 2019 · 0 comments

Comments

@tiagoporto
Copy link

My component uses a config as defaultProps

const config = {
  color: 'primary'
}

MyComponent.defaultProps = {
  color: config.color
}

When the doc is generated the default value is generated not with the variable value primary, but by his name config.color

Annotation 2019-11-08 134249

If I use static value works fine

Is there a way to make it work?

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

No branches or pull requests

1 participant