🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-france-regions-map

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-france-regions-map

React component to display a map of France with selectable regions

0.2.3
unpublished
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

React France Regions Map

Demo

demo

Installation

npm i react-france-regions-map

Usage

See demo/App.tsx

<div
  style={{
    width: "100vw",
    height: "100vh",
    display: "flex",
    flexDirection: "column",
    alignItems: "center",
  }}
>
  <FranceMap
    initialSelection={selectedRegions}
    onChange={(regions) => {
      console.log(regions);
      setSelectedRegions(regions);
    }}
    style={{ flex: 1, width: "100%" }}
    map="france-drom"
    colors={{
      default: {
        color: "#4f34eb",
        fillColor: "#4f34eb",
        weight: 1,
      },
      hover: {
        color: "#23badb",
        fillColor: "#23badb",
        weight: 2,
      },
      selected: {
        color: "#82db23",
        fillColor: "#82db23",
        weight: 2,
      },
    }}
  />
  <div>
    Régions sélectionnées :{" "}
    {selectedRegions.join(", ") || "Aucune région sélectionnée"}
  </div>
</div>

Run demo

git clone https://github.com/badwulfy/react-france-regions-map.git
cd react-france-regions-map
npm install
npm run demo

Keywords

react

FAQs

Package last updated on 16 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts