(
createElement: (
props: PropsWithoutRef<P>,
context: LeafletContextInterface,
) => LeafletElement<E>,
updateElement?: (
instance: E,
props: PropsWithoutRef<P>,
prevProps: PropsWithoutRef<P>,
) => void,
)
| 47 | } |
| 48 | |
| 49 | export function createLayerComponent< |
| 50 | E extends Layer, |
| 51 | P extends LayerWithChildrenProps, |
| 52 | >( |
| 53 | createElement: ( |
| 54 | props: PropsWithoutRef<P>, |
| 55 | context: LeafletContextInterface, |
| 56 | ) => LeafletElement<E>, |
| 57 | updateElement?: ( |
| 58 | instance: E, |
| 59 | props: PropsWithoutRef<P>, |
| 60 | prevProps: PropsWithoutRef<P>, |
| 61 | ) => void, |
| 62 | ) { |
| 63 | const useElement = createElementHook(createElement, updateElement) |
| 64 | const useLayer = createLayerHook(useElement) |
| 65 | return createContainerComponent(useLayer) |
| 66 | } |
| 67 | |
| 68 | export function createOverlayComponent< |
| 69 | E extends DivOverlay, |
no test coverage detected
searching dependent graphs…