React-styleguidist: oneOf(Object.keys(SIZES)) is propTypes

Created on 15 May 2018  路  5Comments  路  Source: styleguidist/react-styleguidist

Hello
I see what supporting Object.keys in react-docgen is merged
https://github.com/reactjs/react-docgen/pull/211

When react-styleguidist add this support?

good first issue help wanted

All 5 comments

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

@romanlex , could you check, please?

it's doesn't work( with

const COLORS = Object.keys(colors)

image
And I see this
image

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eduardoinnorway picture eduardoinnorway  路  3Comments

benoitgrasset picture benoitgrasset  路  3Comments

gscottolson picture gscottolson  路  3Comments

sapegin picture sapegin  路  3Comments

crobinson42 picture crobinson42  路  3Comments