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
Each component's description is generated from the JSDoc comment above the component declaration in the component's file.
src/Component/Component.js
/** * The **Component** is used for component like things. */constComponent=()=>();
Examples
Each example is generated from from the named story exports in each stories file.
Note: The first story, generally named primary will appear without a description.
src/__stories__/Component.stories.js
exportconstmyExample=()=><Component/>;
This story will appear in the docs titled "My Example" with no description.
Adding custom title and/or description
A custom story name and story description can be added by adding parameters to your story.
myExample.story={name: 'This is a custom title for the example',parameters: {docs: {storyDescription: `This is a custom description for the example. You can use markdown in here.`}}};
Props Table
The property table is generated from the JSDoc comment above each prop type in the component's file.
src/Component/Component.js
Component.propTypes={/** description of prop */prop: PropTypes.string};
Subcomponents
If Component has subcomponents, add them to the default export as an object to have them included as tabs in the props table.