Open jusa3 opened 2 months ago
You can add a description in the .stories.tsx
file like this:
parameters: {
layout: "centered",
docs: {
description: {
component: "-> Here comes the description <-"
}
}
},
Like this, we could set component
to a string constant from a file containing all descriptions.
Disadvantage: Does not support Markdown
This is also possible for individual stories. Just put the description here inside the story definition in the ...Stories.ts
files:
export const <StoryName> = {
parameters: {
docs: {
description: {
story: ''
}
}
},
...
};
@jusa3 I linked a pull request for you to review.
To enhance the documentation, a short description of the widgets in the Storybook would be nice. Maybe at the top of the Docs tab. There is an example for the AutocompleteWidget. It is a comment in the AutocompleteWidget.tsx. Sadly, I did not find a solution yet to gather the widget descriptions in a file as with the arguments in the storyArgs.ts.