Using the style guide - JumboCode/TUTV GitHub Wiki

To test and document our components, we are going to use a tool called styleguidist which helps us create a style guide with examples of all available components. Who knew? (Not to be confused with stylelint, which is our CSS linter).

Using it is very simple. In your component's directory, create a file called Readme.md. Let's say your component is called Button. Here's what you will write in Readme.md to create a simple example:

Here's how you can display your component in the styleguide. Or whatever documentation text you wanna put here.

```jsx
<Button />
```

To see these in the styleguide, run yarn run styleguide in the client directory. You will be able to see your component live as you make changes to it. This method of testing your code is most appropriate when you are working on a small, isolated component that does not need the rest of the app to be running.

As our project grows, these examples will become more complex, but the basic idea will remain the same.

⚠️ **GitHub.com Fallback** ⚠️