Norwegian Polka Music

    This package has been deprecated

    Author message:

    Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

    @greenlabs/res-daum-postcode

    0.1.1 • Public • Published

    다음 주소 검색 리스크립트 바인딩

    res-daum-postcode다음 주소 검색 자바스크립트 모듈의 리스크립트(ReScript) 바인딩 입니다.

    설치하기

    1. 모듈 설치
    npm i @greenlabs/res-daum-postcode
    or
    yarn add @greenlabs/res-daum-postcode
    1. bsconfig.json 의존성 추가하기
    "bs-dependencies": [
      "@greenlabs/res-daum-postcode"
    ]

    사용방법

    open DaumPostCode
    
    let option = makeOption(
      ~oncomplete=data => data->Js.Console.log,
      ~onresize=size => size->Js.Console.log,
      ~onclose=state =>
        switch state {
        | #FORCE_CLOSE => "fc"->Js.Console.log
        | #COMPLETE_CLOSE => "cc"->Js.Console.log
        },
      ~onsearch=data => data->Js.Console.log,
      ~width=500.0,
      ~height=700.0,
      (),
    )
    let daumPostCode = option->make
    
    // 팝업 방식
    let openOption = makeOpenOption(
      ~q=`문정동`,
      ~left=100.0,
      ~top=200.0,
      ~popupName="주소검색",
      ~autoClose=true,
      (),
    )
    daumPostCode->openPostCode(openOption)
    
    // 임베드 방식
    open Webapi
    let embedOption = makeEmbedOption(~q=`문정동`, ~autoClose=true)
    let div = Dom.document |> Dom.Document.getElementById("search-address")
    div->Belt.Option.map(el => daumPostCode->embedPostCode(el, embedOption))->ignore

    API

    다음 주소 검색 API

    Install

    npm i @greenlabs/res-daum-postcode

    DownloadsWeekly Downloads

    112

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    5.82 kB

    Total Files

    5

    Last publish

    Collaborators

    • minukang
    • gyeop
    • miryangjung
    • jaeholee.gl
    • namenu
    • moondaddi
    • yousleepwhen
    • kimchhickey