React UI
React UI component library for use at Pattern.
Getting started
The package can be found at @pttrn/react-ui.
The project is setup to run using Yarn. You can install all dependencies by running yarn
.
To run the example app:
yarn start
Build the library
To build the module to build, so the updated version can be used by other applications:
yarn build
Use in other applications
To use the private repo, once you have credentials to Pattern NPM you can configure your local machine with the following steps:
- Add @pttrn scope to point to our private package repo:
npm login --registry=https://npm.pattern.com --scope=@pttrn
- Take the value of
_authToken=
in the file ~/.npmrc
and add it to your profile (.bash_profile
, .zshrc
, etc) by adding the following line (making sure to add it before any nvm config)
export NPM_TOKEN="AUTH_TOKEN_HERE"
You should now be able to pull packages in the scope @pttrn
down through yarn or npm!
Contents
The build makes the following available:
dist/ui-component-library.js
dist/styles.css
The JavaScript file contains no styles at all. You'll need to import both to get the look and feel. The following packages are peer dependencies to the library:
- moment
- react
- react-dates
- react-dom
- react-router-dom