JaeSeoKim / react-kakao-maps-sdk

React components for using kakao map api
https://react-kakao-maps-sdk.jaeseokim.dev
MIT License
273 stars 30 forks source link

CustomOverlayMap 등록시 className 에러 #42

Closed seongsoo96 closed 1 year ago

seongsoo96 commented 1 year ago
      <CustomOverlayMap
          position={center}
          className={`MapWalker ${getAngleClassName(pan)}`}
          yAnchor={1}
        >
          <div className={`angleBack`}></div>
          <div className={"figure"}></div>
        </CustomOverlayMap>

https://react-kakao-maps-sdk.jaeseokim.dev/docs/sample/roadview/moveRoadview 이부분 보고 따라했는데 className에서 에러가 납니다.

TS2322: Type '{ children: Element[]; position: { lat: number; lng: number; }; className: string; yAnchor: number; }' is not assignable to type 'IntrinsicAttributes & CustomOverlayMapProps & { children?: ReactNode; } & RefAttributes'. Property 'className' does not exist on type 'IntrinsicAttributes & CustomOverlayMapProps & { children?: ReactNode; } & RefAttributes'. 70 | <CustomOverlayMap 71 | position={center}

72 | className={MapWalker ${getAngleClassName(pan)}} | ^^^^^^^^^ 73 | yAnchor={1} 74 | > 75 | <div className={angleBack}>

임의로 CustomOverlayMap.d.ts에 스크린샷 2023-01-03 오후 5 04 19 이 부분을 아래와 같이 추가해주면 에러는 해결이 됩니다. 스크린샷 2023-01-03 오후 5 04 47

이렇게 해결하는게 맞는지 궁금합니다.

JaeSeoKim commented 1 year ago

41 이슈를 참고하시면 좋을 것 같습니다.! 문서를 잘못 작성한 부분이 있어서 발생한 문제 입니다 ;;

문서를 수정하여 반영을 해야 하는데, 군대에 있다보니 컴퓨터로 작업을 하기 힘든 부분이 있어서 양해 부탁드립니다 ㅠㅠ

seongsoo96 commented 1 year ago

감사합니다 잘 해결 되었습니다 ^^