2.0.1 • Published 1 year ago

@costcolabs/forge-components v2.0.1

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

The forge-components storybook design system

Contributing

Tips

  • Images for testing your components reside in the public directory
  • Locales also reside in the public directory
  • Please follow the existing directory / filename structure: ./src/stories//>ComponentName>/
  • HTML namespaces (xml) is not supported in JSX
  • Follow the templates in src/story-template as a guide
  • When exporting your component for others to use be sure to update index.js.
  • Branch off of the develop branch.
    • Following the naming pattern story/STRY12345

Reference

Unit testing (using Jest)

See ./src/components/AlertHeader/index.test.js for an example of how to write a Jest unit test. Notice how we wrap the component being tested with a provider so the Costco style is injected.

To run your tests for Storybook:

npm run test:generate-output --workspace @costcolabs/forge-components

Once this command finishes you may start storybook to view the results of your test in Storybook