All files / type-control/src index.tsx

75% Statements 3/4
100% Branches 0/0
50% Functions 1/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14                  1x 1x 1x    
/// <reference types="@uiw/react-baidu-map-types" />
import React, { useImperativeHandle } from 'react';
import { OverlayProps } from '@uiw/react-baidu-map-map';
import { useMapTypeControl } from './useMapTypeControl';
 
export * from './useMapTypeControl';
export interface MapTypeControlProps extends OverlayProps, BMap.MapTypeControlOptions {}
 
export default React.forwardRef<MapTypeControlProps, MapTypeControlProps>((props, ref) => {
  const { mapTypeControl } = useMapTypeControl(props);
  useImperativeHandle(ref, () => ({ ...props, mapTypeControl }), [mapTypeControl, props]);
  return null;
});