-
Notifications
You must be signed in to change notification settings - Fork 935
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
bit autodocs should support non-primitive types #2487
Comments
We are using react-docgen to generate react docs. {
"description": "A wrapper resembling a physical card, grouping elements and improve readability.",
"displayName": "Card",
"methods": [],
"props": {
"elevation": {
"required": false,
"tsType": {
"name": "union",
"raw": "'none' | 'low' | 'medium' | 'high'",
"elements": [
{
"name": "literal",
"value": "'none'"
},
{
"name": "literal",
"value": "'low'"
},
{
"name": "literal",
"value": "'medium'"
},
{
"name": "literal",
"value": "'high'"
}
]
},
"description": "Controls the shadow cast by the card, to generate a \"stacking\" effects.\nFor example, a modal floating over elements may have a 'high' elevation",
"defaultValue": {
"value": "'low'",
"computed": false
}
}
}
} Looks like the data is there, so it should be pretty easy to support it. |
* upgrade react-docgen from 4.x to 5.x. * resolve #2487, fix react docs of union type prop * update pkg version * disable pack temporary because of vercel/pkg#883 Co-authored-by: Gilad Shoham <shoham.gilad@gmail.com>
hey, it's working nicely. I did get an unexpected rewire on export, talking to Gilad about it. Still doesn't work for this component:
|
@KutnerUri , is this still an issue? |
oh I will try this config. I can confirm this is solved in the dev version of bit, plus some removal of unsupported syntax, like |
Bit should detect prop 'elevation' for this component:
I expect to get these docs:
Actually, I get these docs:
Specifications
The text was updated successfully, but these errors were encountered: