# Perimeter81 UI

This is a library of UI components and tools based on the Perimeter81 Design System.

P81 [monorepo](https://github.com/joelparkerhenderson/monorepo-vs-polyrepo#what-is-monorepo), using [Nx](https://nx.dev).

The monorepo currently includes only the UI components library.

When you reference `@perimeter_81/ui` as an npm module into a project you can just import all needed components or tools like this:

```javascript
import { Button, DataGrid, Loading, Typography, arrayMove } from '@perimeter_81/ui';
```

## Installation

Simply clone repo and run `npm install`.

You can also install [nx cli](https://nx.dev/using-nx/nx-cli) globally but it is not necessary.

## Projects

- [UI components library](./libs/ui/README.md)
- [storybook](./libs/storybook/README.md)

## Pre-commit

`husky` will run lint and format on staged files before committing and will break on errors.

Commit names must follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

Its recommended to commit using `npm run cz`.

## Pipeline

On PR to main the pipeline will run lint and tests on all affected projects and will break on errors.

## About NX

Visit the [Nx Documentation](https://nx.dev) to learn more.

## Update aws-assets

To update the aws-assets and use then inside stories run `node ./scripts/fetch-aws-assets.mjs`
