@segment/react-ui-library
v9.0.3
Published
> Presentational React Components with a coherent API for developers
Downloads
223
Maintainers
Keywords
Readme
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/ to see the Storybook
Usage
Using the react-ui-library
should be fairly straightforward.
Install and then import whatever components you need:
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
- Create a new component in
/src/components/Comp.js
- Create a new test for your component
/src/components/Comp.test.js
- Create a new story in
/src/stories/Comp.js
with documentation and examples