react-iraq-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

react-iraq-component

Alt Text

react-iraq-component Provides you with an SVG of Iraq map with the ability to highlight different provinces in different colors.

Installation

NPM

npm install react-iraq-component

Yarn

yarn add react-iraq-component

Usage

import { IraqMap } from "react-iraq-component";

const MyComponent = () => {
  return (
    <IraqMap
      data={[
        {
          name: "baghdad", // baghdad will be highlighted in red.
          color: "red",
        },
      ]}
    />
  );
};

export default MyComponent;

Props

Prop Default Description
Data Required An array of objects { name: IProvincesNames, color: string } to highlight a province.
height 100% The height of the map component.
width 100% The width of the map component.
backgroundColor #88a4bc The color of provinces which are not highlighted.
className Optional

Package Sidebar

Install

npm i react-iraq-component

Weekly Downloads

1

Version

1.0.11

License

MIT

Unpacked Size

610 kB

Total Files

11

Last publish

Collaborators

  • atheer_a_peter