A library of chart interface components for the Tupaia project.
In the package directory, you can run:
yarn storybook
Or from the monorepo root:
yarn workspace @tupaia/ui-chart-components storybook
This runs the Storybook app and pulls stories from the stories/
directory which have a .stories.js
suffix.
The page will reload if you make edits.
Storybook is an open-source tool for developing UI components.
The components are mostly built on top of components from the Recharts library.
- Use Styled Components to customise components.
- Import Material UI components with a
Mui
prefix to when you need to disambiguate them from custom components. e.g.import { Button as MuiButton } from '@material-ui/core'
- Avoid hard-coding children and allow them to be passed in as JSX as much as possible.
- Export components using named exports.