(createInstance: (props: PropsWithoutRef<P>) => E)
| 32 | interface PathWithChildrenProps extends PathProps, PropsWithChildren {} |
| 33 | |
| 34 | export function createControlComponent< |
| 35 | E extends Control, |
| 36 | P extends ControlOptions, |
| 37 | >(createInstance: (props: PropsWithoutRef<P>) => E) { |
| 38 | function createElement( |
| 39 | props: PropsWithoutRef<P>, |
| 40 | context: LeafletContextInterface, |
| 41 | ): LeafletElement<E> { |
| 42 | return createElementObject(createInstance(props), context) |
| 43 | } |
| 44 | const useElement = createElementHook(createElement) |
| 45 | const useControl = createControlHook(useElement) |
| 46 | return createLeafComponent(useControl) |
| 47 | } |
| 48 | |
| 49 | export function createLayerComponent< |
| 50 | E extends Layer, |
no test coverage detected
searching dependent graphs…