react-turkey-map
v1.0.19
Published
Customizable Turkey map
Downloads
56
Maintainers
Readme
react-turkey-map
Customizable Turkey map
Demo
Basic Map
PlayCode - StackBlitz - CodeSandbox - Vercel (Next.js) - CodePen (UMD) - JSFiddle (UMD)
Colorful Map
PlayCode - StackBlitz - CodeSandbox - Vercel (Next.js) - CodePen (UMD) - JSFiddle (UMD)
Preview
Basic Map
Colorful Map
Installation
Install with NPM
npm install react-turkey-map
Usage
import TurkeyMap from 'react-turkey-map'
export default () => {
return (
<TurkeyMap />
)
}
Props
<TurkeyMap
showTooltip
colorData={{}}
tooltipData={{}}
/>
// types and defaults
showTooltip: bool (default: true)
colorData: object (default: {})
tooltipData: object (default: {})
// colorData prop
// plate: city color
colorData={{
'34': '#071E58',
'06': '#253494',
'35': '#253494',
'16': '#253494',
'07': '#225EA8'
}}
// tooltipData prop
// plate: city tooltip
tooltipData={{
'34': '15.655.924',
'06': '5.803.482',
'35': '4.479.525',
'16': '3.214.571',
'07': '2.696.249'
}}
Contribution
Feel free to contribute. Open a new issue, or make a pull request.