# React UI library for Segment
> Presentational React Components with a coherent API for developers

* Powerful component API
* Dedicated UI engineering workflow
* Documentation with React Storybook
* Powerful prototyping tool

## Install

```
$ yarn add @segment/react-ui-library
```

## React Storybook and Documentation

React Storybook will be used as a reference and documentation for most components.

```
yarn run storybook
```

Open [http://localhost:9009/](http://localhost:9009/) to see the Storybook

## Usage

Using the `react-ui-library` should be fairly straightforward.
Install and then import whatever components you need:

```jsx
import React from 'react'
import ReactDOM from 'react-dom'
import {
  Button
} from '@segment/react-ui-library'

ReactDOM.render(<Button primary>I am using the UI Library!</Button>, document.getElementById('root'))
```

Read the Storybook for more documentation.

## Releasing a new version

Run `make release` on the `master` branch and follow the instructions. Avoid breaking changes in minor and patch releases.

## Creating new components

1. Create a new component in `/src/components/Comp.js`
2. Create a new test for your component `/src/components/Comp.test.js`
3. Create a new story in `/src/stories/Comp.js` with documentation and examples
