1.0.4 • Published 6 months ago
@types/react-nepal-map v1.0.4
Installation
npm install --save @types/react-nepal-map
Summary
This package contains type definitions for react-nepal-map (https://github.com/keyrunpay/react-nepal-map#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-nepal-map.
index.d.ts
// Type definitions for react-nepal-map 1.0
// Project: https://github.com/keyrunpay/react-nepal-map#readme
// Definitions by: Ashish Yadav <https://github.com/ashiishme>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as React from 'react';
export as namespace ReactNepalMap;
/**
* Returns random color string
*/
export function getRandomColor(): string;
/**
* Metadata types for Map
*/
export interface MapMetaDataTypes {
name: string;
shape: string;
}
export interface DistrictMapTypes extends MapMetaDataTypes {
zip: number;
province: number;
}
export interface ProvinceMapTypes extends MapMetaDataTypes {
zip: number;
}
export interface ZonalMapTypes extends MapMetaDataTypes {
code: string;
}
/**
* Map data
*/
export const districtMapData: DistrictMapTypes[];
export const provinceMapData: ProvinceMapTypes[];
export const zonalMapData: ZonalMapTypes[];
/**
* Items props for onMapClick method
*/
export interface itemProps {
name: string;
zip: number;
province: number;
code: string;
}
/**
* Map component props
*/
export interface MapPropsTypes {
onMapClick?: ((item: itemProps) => void) | undefined;
randomSectorColor?: boolean | undefined;
sectorClassName?: string | undefined;
containerClassName?: string | undefined;
color?: string | undefined;
hoverColor?: string | undefined;
stroke?: string | undefined;
strokeWidth?: number | undefined;
}
export interface ProvinceMapPropsTypes extends MapPropsTypes {
provinceColor?: string[] | undefined;
}
// Components
export const DistrictMap: React.FC<MapPropsTypes>;
export const ProvinceMap: React.FC<ProvinceMapPropsTypes>;
export const ZonalMap: React.FC<MapPropsTypes>;
Additional Details
- Last updated: Thu, 08 Jul 2021 22:41:22 GMT
- Dependencies: @types/react
- Global values:
ReactNepalMap
Credits
These definitions were written by Ashish Yadav.