Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Latest commit

 

History

History
37 lines (27 loc) · 1.13 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.13 KB

react-components-showroom

Proof of concept of a shoowroom for buildo-react-components using react-styleguidist.

Try

Install dependencies with yarn then:

yarn start

and visit http://localhost:6060

How to add a component

Suppose you want to add the component Foo from brc to the showroom:

  • Edit styleguide.config.js and add the component to the Components section:

        {
          name: 'Components',
          components: () => [
    -       brc('AsyncStatusIndicator')
    +       brc('AsyncStatusIndicator'),
    +       brc('Foo')
          ],
        }
  • Import the default style in main.scss

      @import '~buildo-react-components/src/AsyncStatusIndicator/asyncStatusIndicator.scss';
    + @import '~buildo-react-components/src/Foo/foo.scss';
  • Add examples and descriptions in examples/Foo.md. Any markdown can go in there, all ```js code blocks will be rendered as an interactive component. More info here.