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

mheathcote1977 picture mheathcote1977  Â·  3Comments

magicmark picture magicmark  Â·  3Comments

vslinko picture vslinko  Â·  3Comments

vchoisk picture vchoisk  Â·  3Comments

gscottolson picture gscottolson  Â·  3Comments