In your react project:
$ npm install git+https://github.com/factorialco/factorial-one#release
Then, in your react files:
// In your `main.tsx` file or any top-level component
import "@factorialco/factorial-one/dist/styles.css"
// If you want to use the shipped fonts
import "@factorialco/factorial-one/dist/fonts.js"
// In any of your components
import { Button } from "@factorialco/factorial-one"
And that's it!
The recommended approach is to use the asdf
dependency manager. On MacOS +
Homebrew:
$ brew install asdf
$ echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${
Then open a new terminal:
$ asdf plugin add nodejs
Then, cd
into the project's directory and:
$ asdf install
This should leave you with a fully working nodejs version.
First, install the dependencies:
$ npm install
Then run the storybook server:
$ npm start