React Component Library
Setup
npm install --save @mercoa/react
yarn add @mercoa/react
Usage
The Mercoa React component library ships with a CSS stylesheet (based on tailwindcss) that needs to be imported.
The Mercoa React component library uses a React Context called MercoaSession
. You can wrap your full app with this context, or only include it on specific routes and pages. All Mercoa components need to be inside a valid MercoaSession
component.
Basic Usage
Google Maps API Key
Some Mercoa Components, like the entity onboarding component, use the Google Maps API for address autocompletion. You can get your own Google Maps API by following the instructions here: https://developers.google.com/maps/documentation/embed/get-api-key#create-api-keys
Once you get the key, pass it to the MercoaSession
:
Components
Components are documented at react.mercoa.com!