tomchentw / react-google-maps

React.js Google Maps integration component
https://tomchentw.github.io/react-google-maps/
MIT License
4.62k stars 939 forks source link

fix(types) - add children for Marker, GoogleMaps, InfoWindow #1095

Open mikan-sour opened 1 year ago

mikan-sour commented 1 year ago

PLEASE CHECK "Allow edits from maintainers"

help

FOLLOW "Conventional Commits Specification" FOR ALL COMMITS

https://conventionalcommits.org/

mikan-sour commented 1 year ago

Background

I am using Typescript 4.8.4 and getting a type error when trying to use Marker and InfoWindow as children of the GoogleMap component.

Fix

Add children as an optional prop of type ReactNode to the interfaces for these components.

Additional

Please feel free to make a suggestion for how to better fix or how to change my code as to not need to apply this fix.