Configure yarn to use Able's registry.
yarn config set registry https://registry.able.co
For npm or pnpm check more at https://registry.able.co.
Once you have done that install it as a normal npm package.
yarn add @baseline/icons
# npm i @baseline/icons
Once it's installed in your project import the icon you want to use.
import { Lock } from "@baseline/icons";
And render it as a normal React component.
<Lock className="w-4 h-4" />
All icons receive a single className
prop which could be:
- A string of classes separated by spaces
- An object with the classes as keys and a boolean as value, falsy keys will not be added.
- Clone the repository.
- Install the dependencies using
yarn install
command, or justyarn
. - Add the new icon in
src/index.tsx
, remember to test everything. - When you are done, run the tests using the
yarn test
command.