UNPKG

mmr-gl-react

Version:

React components for MMR GL JS-compatible libraries

10 lines (9 loc) 680 B
import type { IControl, ControlPosition } from '../types'; import type { MapContextValue } from './map'; type ControlOptions = { position?: ControlPosition; }; declare function useControl<T extends IControl>(onCreate: (context: MapContextValue) => T, opts?: ControlOptions): T; declare function useControl<T extends IControl>(onCreate: (context: MapContextValue) => T, onRemove: (context: MapContextValue) => void, opts?: ControlOptions): T; declare function useControl<T extends IControl>(onCreate: (context: MapContextValue) => T, onAdd: (context: MapContextValue) => void, onRemove: (context: MapContextValue) => void, opts?: ControlOptions): T; export default useControl;