You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an array of possible values for a prop. I use PropTypes.oneOf(colors), but the generated docs show the string literal "colors" instead of enumerating the colors array.
After more research, this turns out to be an issue with the react-docgen library. You can follow along with the Pull Request here: reactjs/react-docgen#352
😴 This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week without any further activity. Consider opening a pull request if you still have this issue or want this feature.
Current behavior
I have an array of possible values for a prop. I use
PropTypes.oneOf(colors)
, but the generated docs show the string literal "colors" instead of enumerating the colors array.To reproduce
Modify Label component from here to import possible colors from a file
colors.js
Expected behavior
Replace the
color
propType in the Label component to a hard-coded array:The text was updated successfully, but these errors were encountered: