Reusable UI components for Deriv.
In this document
- General - Contains general philosophy and overview of this package
- Modules docs - Contains implementation guides (i.e., scaffolding, code usage)
Setup:
lerna bootstrap
Serve:
npm run serve
Build:
npm run build
Test:
npm run test
npm run storybook
storybook:build:
npm run storybook:build
storybook:deploy:
npm run storybook:deploy br_storybook
You can import individual components with ES6 named imports.
import { Button } from '@deriv/components';
const SomeComponent = () => (
<Button is_disabled primary>
Hello World
</Button>
);
NOTE: While developing new components, be mindful that import the direct
.jsx
file, instead of referencing../component/index.js
. This will make sure there won't be a style bleed When it is imported from other packages.