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

oneOf(Object.keys(SIZES)) is propTypes #986

Open
romanlex opened this issue May 15, 2018 · 5 comments
Open

oneOf(Object.keys(SIZES)) is propTypes #986

romanlex opened this issue May 15, 2018 · 5 comments
Labels

Comments

@romanlex
Copy link

Hello
I see what supporting Object.keys in react-docgen is merged
reactjs/react-docgen#211

When react-styleguidist add this support?

@sapegin
Copy link
Member

sapegin commented May 16, 2018

As soon as someone sends a pull request with an update ;-)

@stepancar
Copy link
Member

@romanlex , could you check, please?

@romanlex
Copy link
Author

romanlex commented Jun 25, 2018

it's doesn't work( with

const COLORS = Object.keys(colors)

image
And I see this
image

May be it is reactjs/react-docgen#211 merged to master and doesn't merged to dev branch with 3.x version

@jmetev1
Copy link

jmetev1 commented Oct 20, 2018

It looks like the colors example works for me.
const colors = { red: 'redddd', blue: 'blllluuuu' }
const COLORS = Object.keys(colors)
gives:
image

That's the desired outcome right? @romanlex @sapegin

@andreapiras
Copy link

It looks like the colors example works for me

@jmetev1 yeah that works as long as colors is defined inside the same file. If you import colors from external file (which is a very common pattern) doesn't work

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

No branches or pull requests

5 participants