react-basic-world-map

1.1.8 • Public • Published

React Basic World Map

Includes basic svg world map and continents.

Demo

demo

Installation

npm install react-basic-world-map --save

Usage

import BasicWorldMap from 'react-basic-world-map';

<BasicWorldMap />
import BasicWorldMap from 'react-basic-world-map';

<BasicWorldMap
    primaryColor="black"
    secondaryColor="gray"
/>

Full Usage

import React from 'react';
import BasicWorldMap from 'react-basic-world-map';

export default function App() {

    const onClickMapLocation = (selectedContinent: ContinentItem) => {
        // do something
    }

    const continents: ContinentItem[] = [
        { key: "africa", value: "Afrika" },
        { key: "south_america", value: "Güney Amerika" },
        { key: "europe", value: "Avrupa" },
        { key: "asia", value: "Asya" },
        { key: "america", value: "Amerika" },
        { key: "australia", value: "Okyanusya" }
    ]

    return (
        <BasicWorldMap
            primaryColor="black"
            secondaryColor="gray"
            onClickMapContinent={onClickMapLocation}
            continents= {continents}
        />
    )
}

Props

Property Type
primaryColor string
seondaryColor string
onClickMapContinent function
continents array

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i react-basic-world-map

Weekly Downloads

0

Version

1.1.8

License

ISC

Unpacked Size

91.6 kB

Total Files

6

Last publish

Collaborators

  • aselcuk