@deatog/react-google-maps-api
Version:
React.js Google Maps API integration
24 lines (23 loc) • 1.15 kB
TypeScript
import { PureComponent, type ContextType, type ReactNode } from "react";
import { AdvancedMarkerContext } from "./AdvancedMarker";
export type PinProps = {
background?: string | undefined;
borderColor?: string | undefined;
glyph?: string | URL | Element | undefined;
glyphColor?: string | undefined;
scale?: number | undefined;
onLoad?: ((pin: google.maps.marker.PinElement) => void) | undefined;
onUnmount?: ((pin: google.maps.marker.PinElement) => void) | undefined;
};
declare function PinFunctional({ background, borderColor, glyph, glyphColor, scale, onLoad, onUnmount }: PinProps): null;
export declare const PinF: import("react").MemoExoticComponent<typeof PinFunctional>;
export declare class Pin extends PureComponent<PinProps> {
static contextType: import("react").Context<google.maps.marker.AdvancedMarkerElement | null>;
context: ContextType<typeof AdvancedMarkerContext>;
pin: google.maps.marker.PinElement | undefined;
componentDidMount(): void;
componentDidUpdate(prevProps: Readonly<PinProps>): void;
componentWillUnmount(): void;
render(): ReactNode;
}
export default Pin;