Closed ipetinate closed 3 weeks ago
Setting the jsdoc as the description is not a bug, it's a feature. You can overwrite this by setting an empty string as the description (see chapter description in the documentation website) at the preview, meta or story level. Or just go in and provide a meaningful description instead in one of these places.
Setting the jsdoc as the description is not a bug, it's a feature. You can overwrite this by setting an empty string as the description (see chapter description in the documentation website) at the preview, meta or story level. Or just go in and provide a meaningful description instead in one of these places.
Thanks, I figured this out after searching a lot about it in the docs.
I'm now using the following code block in my stories and it has solved the problem:
{
"parameters": {
"docs": {
"description": {
"component": "Description here"
}
}
}
}
But the strange thing was that some (in this case 3 components) did not add the comments with JSDocs. But anyway, I managed to solve what I thought was a problem (and it wasn't).
Describe the bug
Storybook is placing the JSDocs annotations of my components on the page generated by autodocs.
And in some components, it caused the correct functioning to break.
https://github.com/user-attachments/assets/1e9028f1-53cd-4aaa-b891-40b0dd2e048f
Code examples
Component
Story
Deps and Dev Deps
Reproduction link
...
Reproduction steps
System
Additional context
Some components did not break even though the JSDocs were annotated.
Conditional.tsx