1.6.0 • Published 3 years ago

@truepilldev/optum-component-library v1.6.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Documentation & Community

Install and use components

Optum Component Library is made up of multiple components and tools which you can import one by one. All you need to do is install the @truepilldev/optum-component-library package:

$ yarn add @truepilldev/optum-component-library
# or
$ npm install --save @truepilldev/optum-component-library

A working version, assuming you are using something like Create React App, might look like this:

import { Footer } from  '@truepilldev/optum-component-library';

ReactDOM.render(
<Footer 
content={content} 
documentToReactComponents={defaultArgs.documentToReactComponents}
featureFlags={featureFlags}
/>, document.getElementById('root'))

🤓 Scripts explained

Inside the package.json there are a bunch of scripts that this repo uses to run the project in development and to build the project.

Below you can read a description of each script.

  • yarn storybook: Starts the development React Storybook.

  • yarn build-storybook: Builds storybook

  • yarn lint-staged: Runs on pre-commit and lints stagged files

  • yarn test: Runs the unit tests using Jest

  • yarn build: Builds all of the JavaScript files using Rollup.

For the following command:

yarn build

The following file tree will be generated:

/dist
├── /assets/
├── /components/
|   │── /[component-name]
|	    │── [component-name].d.ts
|	    │── [component-name].js
|	    │── [component-name].js.map
|	    │── [component-name].module.scss.js
|	    │── [component-name].module.scss.js.map
|   	└── index.d.ts
├── /static/
├── /styles/
├── index.js
├── index.js.map
├── index.min.css
└── index.d.ts

👏 Respect earns Respect

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members
1.6.0

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago