UNPKG

@uiw/react-amap-map

Version:

基于 React 封装的高德地图组件。AMap Component Based On React.

23 lines (22 loc) 806 B
import React, { FC, PropsWithChildren } from 'react'; export * from './useMap'; export * from './context'; type RenderProps = { children?: (data: { AMap: typeof AMap; map: AMap.Map; container?: HTMLDivElement | null; }) => undefined; } | { children?: React.ReactNode; }; export interface MapProps extends AMap.MapEvents, AMap.MapOptions { className?: React.HTMLAttributes<HTMLDivElement>['className']; style?: React.HTMLAttributes<HTMLDivElement>['style']; container?: HTMLDivElement | null; children?: JSX.Element | RenderProps['children']; } export declare const Provider: FC<PropsWithChildren<RenderProps>>; export declare const Map: React.ForwardRefExoticComponent<(MapProps & RenderProps) & React.RefAttributes<MapProps & { map?: AMap.Map; }>>;