New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-brazil-map-2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-brazil-map-2

Component of the map of Brazil

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

react-brazil-map · npm version

Accessible Brazil map component for React.JS

Table of Contents

Installation

To install, you can use npm:

$ npm install --save react-brazil-map

To install, you can use yarn:

$ yarn add react-brazil-map

Examples

Example of district selection and default style:

import React, { useState } from 'react'
import { MapBrazil } from 'react-brazil-map'

function App () {
  const [district, setDistrict] = useState('')
  return (
    <div className='App'>
      <MapBrazil onChange={setDistrict} />
      <p>The selected district was {district}</p>
    </div>
  )
}

Customize the background color, selection color and map outline:

import React from 'react'
import { MapBrazil } from 'react-brazil-map'

function App () {
  return (
    <div className='App'>
      <MapBrazil bg='#6edbdb' fill='#000' colorStroke='red' />
    </div>
  )
}

You can also pass a style for the district title, width and height of the map:

import React from 'react'
import { MapBrazil } from 'react-brazil-map'

function App () {
  return (
    <div className='App'>
      <MapBrazil colorLabel='red' width={500} height={500} />
    </div>
  )
}

Keywords

Mapa do Brasil

FAQs

Package last updated on 28 Nov 2023

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