({
children,
...options
}: { children: ReactNode } & JsonTreeOptions)
| 34 | ); |
| 35 | |
| 36 | export function JsonTreeViewProvider({ |
| 37 | children, |
| 38 | ...options |
| 39 | }: { children: ReactNode } & JsonTreeOptions) { |
| 40 | const instance = useJsonTree(options); |
| 41 | |
| 42 | return ( |
| 43 | <JsonTreeViewContext.Provider value={instance}> |
| 44 | {children} |
| 45 | </JsonTreeViewContext.Provider> |
| 46 | ); |
| 47 | } |
| 48 | |
| 49 | export function useJsonTree(options: JsonTreeOptions): UseJsonTreeInstance { |
| 50 | const parentRef = useRef<HTMLDivElement>(null); |
nothing calls this directly
no test coverage detected