1.0.7 • Published 5 years ago

@danah/react-hook-daum-map v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@danah/react-hook-daum-map

React Hook to makes funtional react for daum map easy. Demo

Installation

- yarn

yarn add @danah/react-hook-daum-map

- npm

npm i @danah/react-hook-daum-map

Usage

import React from "react";
import daumMap from "@danah/react-hook-daum-map";

function App() {
  const map = daumMap({
    apiKey: "Input your own API key",
    lng: 33.450701,
    lat: 126.570667,
    name: "Input your place name"
  });

  return (
    <div style={{ height: "460px", width: "630px" }}>
      <div {...map} />
    </div>
  );
}

Arguments

ArgumentTypeRequired
apistringyes
lngnumberyes
latnumberyes
namestringno

Return

react-hook-daumMap returns an object containing the following:

NameTypeDescription
idstringId attribute
refReact RefA ref created to daum map
styleObjectStyle object containing {width: "100%", height: "100%"} to give to the element as a default

It's recommended to just spread the returned object on the element as shown in the Usage section above.

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago