@hurumap-ui/core
v0.3.5-alpha.42
Published
UI components for HURUmap.
Downloads
19
Readme
Core Components Reference
This packages includes a library of generic HURUmap core components to be used for creating common UI elements shared between applications and the HURUmap dashboard.
Installation
Install the module
npm install @hurumap-ui/core --save
Usage
These components can be accessed by importing from the core
root directory:
/**
* HURUmap dependencies
*/
import { Card } from '@hurumap-ui/core';
export default function MyVisual() {
return <Card
id="668"
type="hurumap"
geoId="country-KE"
showInsight
showStatVisual
definition={{
id: 668,
title: 'Contribution by principal donor',
subtitle: 'Development Assistance',
visual: {
type: 'column',
table: 'allDonors',
x: 'donor',
y: 'total',
typeProps: {
horizontal: true
},
queryAlias: 'v668'
},
stat: {
type: 'number',
subtitle: 'Development Assistance',
description: 'Donor Contribution',
unique: false,
aggregate: 'sum',
queryAlias: 'v668'
},
source: [],
description: []
}}
/>;
}