Styleguide
VTEX Styleguide React components (Docs)
Usage
yarn add @vtex/styleguide --exact
npm install @vtex/styleguide --save-exact
import Button from '@vtex/styleguide/lib/Button'
Developing
Setup
yarn install
Running
yarn styleguide
Snapshots
To save the components snapshots use:
yarn snap:test
Check the snapshots and to approve the changes use:
yarn snap:approve
You can use the option --filter
to just test or approve a specific component. Example:
yarn snap:approve --filter "Button"
Developing using npm link
Run this in this repo:
yarn develop
In your project run:
npm link @vtex/styleguide
Import (case a <Button>
component in lib):
import Button from '@vtex/styleguide/lib/Button'
Publishing
releasy pre
npm publish
Docs
To update the docs:
yarn deploy
Known issues
- Your project has to run with webpack >= 2. Here's a guide for upgrading Webpack to v2.