@axa-ch/esales-ui-components

Library of reusable components for esales PODs

Usage no npm install needed!

<script type="module">
  import axaChEsalesUiComponents from 'https://cdn.skypack.dev/@axa-ch/esales-ui-components';
</script>

README

eSales UI-Components Library

npm version Publish NPM package Publish Storybook to Github pages

This library should be a collection of reusable components built with React & Typescript, based on AXAs own Pattern library

Demo of available components is published on github pages and updated with each commit: Storybook Demo

How to use

  • Download the latest version from npmjs.org:

      npm i @axa-ch/esales-ui-components
    

    or

      yarn add @axa-ch/esales-ui-components
    
  • use it in the code:

      import { AxaButton } from '@axa-ch/esales-ui-components';
    

Testing

For testing we are using Jest with Storybook addon for snapshot testing All configurations for testing can be found in jest.config.js file as well as .jest, __mocks__ and .storybook folders.

To start tests just run the command. This will include both unit and snapshot tests.

  yarn test:silent
  • Snapshot testing

    • Tests are automatically generated once the story for component is added

    • If you have changed component snapshot tests will fail, in order to remedy this you need to update snapshots and commit it to the github

        yarn test:silent -u
      
  • Unit testing

    • We are using testing-library so please check out examples and api references in order to fully utilize this lib

How to contribute

  • Clone this repository
  • Install all dependencies yarn install
  • Spin-up storybook and start hacking: yarn storybook
  • Check out our "How to document" readme