@globalfishingwatch/map-components
v3.8.15
Published
Set of components used in global fishing watch world
Downloads
163
Keywords
Readme
⚠️ LEGACY ⚠️ GFW map components
All components has been moved to a monorepo and are now available at @globalfishingwatch/ui-components.
This repo only contains now legacy components used in data-portal and map-client
- Timebar (2.2 branch)
- MapModule
Using the components
Check out the online documentation
Components structure
component
│ component.js // Component logic
│ component.css // Component styles
│ component.mdx // Generates component documentation
│ index.js // Optional file that generates a new folder below the components one
│ // and exports component code and any possible child component dependencies
│ // This makes possible components code splitting easily with
│ // import Component from '@globalfishingwatch/map-components/components/[component-name]
│
└───subcomponent
│ subcomponent.js
│ subcomponent.css
└───────────────────────
Develop with components
In order to do easier edits on the components while developping parent apps, use this repo locally:
git clone [email protected]:GlobalFishingWatch/map-components.git
cd map-components
yarn install
yarn link
yarn start
cd sandbox
yarn install
yarn link "@globalfishingwatch/map-components"
yarn start
Documentation
Docz is used to include live components documentation using mdx.
This playground could be used locally to test the components running:
yarn docz:dev
Release
Using zeit release to make our life easier, so just run
npx release major|minor|patch
and it will update the package.json, generate the github release and push your changes and finally:
npm publish
(⚠️ don't forget to bump dependency version on parent project if needed!)