react-basic-world-map
v1.1.8
Published
Includes basic svg world map and continents.
Downloads
56
Readme
React Basic World Map
Includes basic svg world map and continents.
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
|