@hurumap-ui/core

0.3.5-alpha.42 • Public • Published

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: []
            }}
        />;
}



Hurumap

Readme

Keywords

Package Sidebar

Install

npm i @hurumap-ui/core

Weekly Downloads

1

Version

0.3.5-alpha.42

License

GPL-2.0-or-later

Unpacked Size

364 kB

Total Files

55

Last publish

Collaborators

  • codeforafrica-tech
  • kilemensi