Circuit's Components
Circuit's collection of reusable components.
Live Storybook
Installation and usage
First things first, install it with yarn
:
yarn add @getcircuit/components
Then, you're ready to import any exported component:
import { Button } from '@getcircuit/components'
export default () => {
return (
<div>
<Button>Submit</Button>
</div>
)
}
Development
Clone the repository and install its dependencies.
git clone https://github.com/getcircuit/component-library
cd component-library
yarn
Do not use npm to install the dependencies, as the specific package versions in yarn.lock
are used to build and test the library.
To have an isolated environment to develop components, we use Storybook:
yarn run storybook:dev
This will bootstrap a local storybook and open it in your browser.
To build the the library package:
yarn run build
To publish the library to npm (it will automatically run the build and test steps):
yarn publish
Running Tests
yarn test