reablocks
Version:
Component library for React
52 lines (50 loc) • 1.44 kB
TypeScript
import { JsonTreeTheme } from './JsonTreeTheme';
import { JsonTreeData } from './utils';
import { FC } from 'react';
export interface JsonTreeNodeProps {
/**
* The data to be rendered as a JSON tree.
*/
data?: JsonTreeData;
/**
* The CSS class name to be applied to the JSON tree node.
*/
className?: string;
/**
* If true, the count of child nodes will be shown next to each node.
*/
showCount?: boolean;
/**
* If true, empty nodes will be shown in the JSON tree.
*/
showEmpty?: boolean;
/**
* The depth of the JSON tree node. This is typically used for indentation purposes.
*/
depth?: number;
/**
* If true, all nodes in the JSON tree will be expanded by default.
*/
showAll?: boolean;
/**
* The limit for the number of nodes to show when `showAll` is false.
*/
showAllLimit?: number;
/**
* The depth at which the JSON tree nodes should be expanded by default.
*/
expandDepth?: number;
/**
* Theme for the Json Tree
*/
theme?: JsonTreeTheme;
/**
* If true, long text in nodes will be truncated and replaced with an ellipsis.
*/
ellipsisText?: boolean;
/**
* The maximum length of text in a node before it is truncated and replaced with an ellipsis.
*/
ellipsisTextLength?: number;
}
export declare const JsonTreeNode: FC<JsonTreeNodeProps>;