-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Nested union type in react-native docs #13
Comments
I assume that whatever renders the docs is not set up to render unions. The output from react-docgen should be something like "transform": {
"type": {
"name": "arrayOf",
"value": {
"name": "union",
"value": [
{
"name": "shape",
"value": {
"rotation": {
"name": "number"
}
}
},
{
"name": "shape",
"value": {
"scaleX": {
"name": "number"
}
}
},
{
"name": "shape",
"value": {
"scaleY": {
"name": "number"
}
}
},
{
"name": "shape",
"value": {
"translateX": {
"name": "number"
}
}
},
{
"name": "shape",
"value": {
"translateY": {
"name": "number"
}
}
}
]
}
},
"required": false,
"description": ""
}
} So all you have to do is iterate over |
Thanks! Fixed here: facebook/react-native#1181 |
Awesome! |
I'm using styleguidist which uses react-docgen, but it still outputs "union" for Flow types such as ("foo" | "bar"). Is there a plugin or patch or something to make it list the union types? I realize this in an old thread, but if there is an answer, I assume it would be useful to others. |
In ViewStyleProps I would like to change
transform
to the following:The current output from docgen is this:
I would prefer for it to be this:
@fkling - am I doing something incorrectly here? If a patch is necessary, could you point me in the right direction?
Thanks!
Related: facebook/react-native#1157
The text was updated successfully, but these errors were encountered: