An open API service indexing awesome lists of open source software.

https://github.com/diamondlightsource/web-ui-components


https://github.com/diamondlightsource/web-ui-components

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# Web UI Components Library

![Code CI](https://github.com/DiamondLightSource/web-ui-components/actions/workflows/node.js.yml/badge.svg) ![Apache Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)

Source code | https://github.com/DiamondLightSource/web-ui-components |
-------------|-----------------------------------------------------------|
Storybook | https://diamondlightsource.github.io/web-ui-components/ |

Generic components for React based Diamond web apps

## Installing

```sh
yarn add @diamondlightsource/ui-components
```

## Building

Building the distribution files:

```sh
yarn install
yarn build
```

Note: In some versions of Node < 16, there can be problems importing JSON files. In this case, the above command may not work and you should run the following:
`node --experimental-json-modules rollup --config rollup.config.mjs`

## Storybook

For examples of how to use components, you can run storybook with yarn storybook. That will open a catalogue of all available components and how to use them. For examples on Chakra (on which this library is based on, and provides plenty of components), visit the project's docs.

## Usage

1. Wrap your application with a Chakra Provider and apply the theme (this is application/framework specific, methods may vary):

```js
import { theme } from "@diamondlightsource/ui-components";



```

2. Use components

```js
import { theme } from "@diamondlightsource/ui-components";


```

## Testing

- Run `yarn test`