1.0.8 • Published 1 year ago

@britishlibrary/component-library v1.0.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

React Component Library

A collection of React components written for The British Library web applications.

Installation

The British Library Component Library is available as an NPM package.

To install it, run the relevant command for your package manager:

// npm
npm install @britishlibrary/fonts @britishlibrary/component-library styled-components

// yarn
yarn add @britishlibrary/fonts @britishlibrary/component-library styled-components

Note: styled-components is a required peer dependency and is installed with the above command.

End-to-end tests

End-to-end tests run in both Chrome and Firefox using Playwright. Tests are dependent on the Storybook running with a test configuration:

yarn storybook:test

Playwright browsers and dependencies also have to be installed:

yarn test:e2e:install

Run all tests

yarn test:e2e

Run specific tests

yarn test:e2e <regex>

Run all tests with tracing

yarn test:e2e:trace

Open the HTML test report

yarn test:e2e:show-report

Chromatic

chromatic

Ship UIs faster with automated workflows for Storybook

Notes

  • If you have issues with storybook, remove node modules and reinstall is a good first troubleshooter, failing that add --no-manager-cache to your start-storybook command. But remove it once rebuilt.