kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
29 lines (28 loc) • 849 B
TypeScript
import React from 'react';
export declare type TreeNodeData<T> = {
key: string;
object: T;
children?: TreeNodeData<T>[];
isOpen?: boolean;
};
export declare type TreeProps<T> = {
className?: string;
treeData: TreeNodeData<T>;
renderNode: TreeNodeProps<T>['renderNode'];
};
/**
* Component that renders a generic tree.
* @param treeData - The tree data.
* @param renderNode - A function that renders a tree node.
*/
export declare function Tree<T>(props: TreeProps<T>): React.ReactElement;
export declare type TreeNodeProps<T> = {
treeData: TreeNodeData<T>;
renderNode: (node: TreeNodeData<T>, isOpen: boolean) => JSX.Element | null;
};
export declare const DatasetNode: ({ node }: {
node: any;
}) => React.JSX.Element;
export declare const ColumnNode: ({ node }: {
node: any;
}) => React.JSX.Element;