> VTEX Styleguide React components ([Docs](https://vtex.github.io/styleguide))
npm install @vtex/styleguide> VTEX Styleguide React components (Docs)
- Usage
- Developing
- Setup
- Running
- Snapshots
- Developing using npm link
- Publishing
- Docs
Add the styleguide to dependencies on manifest.json:
``sh`
"dependencies": {
"vtex.styleguide": "5.x"
},
Importing components:
`js`
import { Button } from 'vtex.styleguide'
`sh`
yarn add @vtex/styleguide --exactor
npm install @vtex/styleguide --save-exact
Importing components:
`js`
import Button from '@vtex/styleguide/lib/Button'
`sh`
yarn install
`sh`
yarn styleguide
To save the components snapshots use:
`sh`
yarn snap:test
Check the snapshots and to approve the changes use:
`sh`
yarn snap:approve
You can use the option --filter to just test or approve a specific component. Example:
`sh`
yarn snap:approve --filter "Button"
Run this in this repo:
`sh`
yarn develop
In your project run:
``
npm link @vtex/styleguide
Import (case a
`js`
import Button from '@vtex/styleguide/lib/Button'
We use releasy to publish our styleguide. To publish on both npm and render(VTEX IO), execute the command below:
`sh`
releasy --stable --npm
Also, if you want to post the changelog on Github Release Notes, is required to configure a Personal Token. See more here. When you have the environment set, add a --notes flag, For example:
`sh`
releasy --stable --npm --notes
To update the docs:
`sh``
yarn deploy
#### Known issues
* Your project has to run with webpack >= 2. Here's a guide for upgrading Webpack to v2.