README
@bitrise/bitkit
Library for React UI components and design patterns.
Setup
git clone git@github.com:bitrise-io/bitkit.git
cd bitkit
yarn install
Technology
- Typescript
- Parcel (bundler and dev servers)
- React (with React Router for routing links)
- PostCSS (with postcss-preset-env for a little power)
- Jest (for unit testing)
Managing icons
If you would like to add a new or edit an existing icon:
- Export the icon from Figma as an SVG. Make sure that the exported file has the following viewBox:
0 0 24 24, otherwise the icon can make smaller or bigger compared to the existing ones. - Rename the file using this convention:
icons-{iconName}.svg(eg.:icons-crown.svg) - Add the file under the
./src/components/Icon/svgfolder. - If you are not running
yarn start, run theyarn build:iconsscript to generate the React component from the SVG. You should commit both the.svgand the generated.tsxfiles. - Make sure to check the new/update icon on the Icons page.
Scripts
$ yarn build
Builds the library and styleguide assets
$ yarn build:icons
Uses @svgr/cli to generate React components and Typescript definitions inside ./src/components/Icon/tsx from the SVG files inside ./src/components/Icon/svg.
$ yarn clean
Cleans up the build directories
$ yarn lint
Runs Javascript and CSS linting
$ yarn serve
Serves up the static files built for the style guide
$ yarn start
Runs the developlement server for the style guide
$ yarn test
Runs the unit tests for the library components