Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.04 KB

README.md

File metadata and controls

36 lines (22 loc) · 1.04 KB

@tupaia/ui-map-components

A library of map interface components for the Tupaia project.

Available scripts

In the package directory, you can run:

yarn storybook

Or from the monorepo root:

yarn workspace @tupaia/ui-map-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

Storybook is an open-source tool for developing UI components.

Leaflet

The components are mostly built on top of components from the Leaflet library.

Notes on approach

  • 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.