Skip to content

Documentation

Jenna Badanowski edited this page May 4, 2020 · 3 revisions

Fundamental-react uses CSF stories and @storybook/addon-docs to automatically generate component documentation.

Description

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.
 */

const Component = () => ();

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
};

Creating a new component checklist

Clone this wiki locally