MCPcopy
hub / github.com/PaulLeCam/react-leaflet / createOverlayComponent

Function createOverlayComponent

packages/core/src/generic.ts:68–81  ·  view source on GitHub ↗
(
  createElement: (
    props: PropsWithoutRef<P>,
    context: LeafletContextInterface,
  ) => LeafletElement<E>,
  useLifecycle: DivOverlayLifecycleHook<E, PropsWithoutRef<P>>,
)

Source from the content-addressed store, hash-verified

66}
67
68export function createOverlayComponent<
69 E extends DivOverlay,
70 P extends LayerWithChildrenProps,
71>(
72 createElement: (
73 props: PropsWithoutRef<P>,
74 context: LeafletContextInterface,
75 ) => LeafletElement<E>,
76 useLifecycle: DivOverlayLifecycleHook<E, PropsWithoutRef<P>>,
77) {
78 const useElement = createElementHook(createElement)
79 const useOverlay = createDivOverlayHook(useElement, useLifecycle)
80 return createDivOverlayComponent(useOverlay)
81}
82
83export function createPathComponent<
84 E extends FeatureGroup | Path,

Callers 3

generic.tsxFile · 0.90
Popup.tsxFile · 0.90
Tooltip.tsxFile · 0.90

Calls 3

createElementHookFunction · 0.85
createDivOverlayHookFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…