1.28.0 • Published 3 months ago

caplink-saas-ui-shared-component-library v1.28.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

caplink-saas-ui-shared-component-library

This project is a shared component library for the Caplink SaaS UI. It is built using React and Storybook.

Installation

  1. Clone the repository
  2. Run npm install to install the dependencies
  3. Run npm run storybook to start the Storybook server

Usage

To use the components in your project, you can install the package from npm:

npm install @caplink/saas-ui-shared-component-library

Then import the components you need:

import { Button } from '@caplink/saas-ui-shared-component-library';

Development

Components

All the components are located in the 'component-library' folder. Each component should be in its own folder, with the component file and any other files it needs (like styles, tests, etc).

An expected component development workflow would be:

  1. Create a new folder for the component
  2. Create the component file (e.g. MyComponent.js)
  3. Create a story file (e.g. MyComponent.stories.js)
  4. Create a test file (e.g. MyComponent.spec.js)
  5. Create a style file (e.g. MyComponent.css) (if needed, we use tailwindcss for styles)
  6. If it's a complex component, create a Cypress test file (e.g. MyComponent.spec.js in the 'cypress' folder)

Folder structure

  • All the components are located in the '/component-library' folder.
  • Each component should be in its own folder, with the component file and any other files it needs (like styles, tests, etc).
  • Cypress tests are located in the 'cypress' folder and should follow the same folder structure as the components.

Storybook

We use Storybook to develop and test the components. To start the Storybook server, run:

npm run sb:dev
npm run sb:build

This will start the Storybook server and open a browser window with the Storybook UI. You can use this to develop and test the components.

This is the gallery of components that we use to develop and test the components. It's also used to generate the documentation for the components, so it's important to keep it up to date and encompassing relevant states and use cases within the stories.

Testing

We use multiple testing libraries to test our components. We use Jest for unit tests and Cypress for more complex integration tests that require a browser.

  • All unit tests are located in the same folder as the component they are testing. The file name should be the same as the component file name, but with a '.spec.xxx' suffix.
  • All Cypress tests are located in the 'cypress' folder.

Contributing

This is a project for the Caplink SaaS UI team. If you are a member of the team, you can contribute to this project by following the standard Git workflow:

  1. Create a new branch for your feature or bug fix
  2. Make your changes
  3. Push your branch to the remote repository
  4. Create a pull request

Developing components with tests is a requirement for contributing to this project.

1.28.0

3 months ago

1.27.3

3 months ago

1.27.2

4 months ago

1.27.1

4 months ago

1.27.0

4 months ago

1.26.0

4 months ago

1.25.4

5 months ago

1.25.3

5 months ago

1.25.1

5 months ago

1.25.2

5 months ago

1.25.0

6 months ago

1.24.0

6 months ago

1.23.0

6 months ago

1.22.0

7 months ago

1.21.0

7 months ago

1.20.1

7 months ago

1.20.0

7 months ago

1.18.0

7 months ago

1.19.0

7 months ago

1.17.0

7 months ago

1.16.0

8 months ago

1.15.0

8 months ago

1.14.0

8 months ago

1.12.1

8 months ago

1.13.1

8 months ago

1.13.0

8 months ago

1.12.0

8 months ago

1.11.0

8 months ago

1.11.1

8 months ago

1.8.0

8 months ago

1.6.0

8 months ago

1.4.0

8 months ago

1.9.0

8 months ago

1.7.0

8 months ago

1.5.0

8 months ago

1.10.0

8 months ago

1.2.0

8 months ago

1.2.2

8 months ago

1.2.1

8 months ago

1.3.0

8 months ago

0.5.10

9 months ago

1.0.1

8 months ago

0.5.11

9 months ago

1.0.0

8 months ago

0.5.18

8 months ago

0.5.16

9 months ago

0.5.17

8 months ago

0.5.14

9 months ago

0.5.15

9 months ago

0.5.12

9 months ago

0.5.13

9 months ago

1.1.1

8 months ago

1.1.0

8 months ago

0.5.8

9 months ago

0.5.7

9 months ago

0.5.9

9 months ago

0.5.4

9 months ago

0.5.3

9 months ago

0.5.6

9 months ago

0.5.5

9 months ago

0.5.0

9 months ago

0.5.2

9 months ago

0.5.1

9 months ago

0.4.8

10 months ago

0.4.7

10 months ago

0.4.6

10 months ago

0.4.5

11 months ago

0.4.4

11 months ago

0.4.3

11 months ago

0.3.17

12 months ago

0.3.16

12 months ago

0.3.15

12 months ago

0.3.14

12 months ago

0.3.13

12 months ago

0.3.20

11 months ago

0.3.22

11 months ago

0.3.21

11 months ago

0.3.19

11 months ago

0.3.18

12 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.4.2

11 months ago

0.3.12

1 year ago

0.3.11

1 year ago

0.3.10

1 year ago

0.3.9

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago