UNPKG

811 BTypeScriptView Raw
1import { FitBoundsOptions, LatLngBoundsExpression, Map as LeafletMap, MapOptions } from 'leaflet';
2import { CSSProperties, MutableRefObject, ReactNode } from 'react';
3export interface MapContainerProps extends MapOptions {
4 bounds?: LatLngBoundsExpression;
5 boundsOptions?: FitBoundsOptions;
6 children?: ReactNode;
7 className?: string;
8 id?: string;
9 placeholder?: ReactNode;
10 style?: CSSProperties;
11 whenCreated?: (map: LeafletMap) => void;
12 whenReady?: () => void;
13}
14export declare function useMapElement(mapRef: MutableRefObject<HTMLElement | null>, props: MapContainerProps): LeafletMap | null;
15export declare function MapContainer<Props extends MapContainerProps = MapContainerProps>({ children, className, id, placeholder, style, whenCreated, ...options }: Props): JSX.Element;