This guide was follwed making this component library: https://dev.to/alexeagleson/how-to-create-and-publish-a-react-component-library-2oe
Build
cd packages/react-components
npm run rollup
Builds to dist
Deploy
From shared-dx
root:
npm run publish-react-components
First it runs the build
-step above then it runs npm publish
.
Make sure you've bumped the version number in packages/react-components/package.json
before you do so
Usage
import { Crow, Icon } from '@ape-egg/react-components';
<Icon name="name-of-icon" size={16} color="#fafafa">
<Crow up left gap={4}>
<div>
Child 1
</div>
<div>
Child 2
</div>
</Crow>
Heads up
When using <Icon />
you are expected to import a IcoMoon font yourself.
Visit https://icomoon.io/ and click IcoMoon App
to get started.