@atlaskit/table-tree
Version:
A table tree is an expandable table for showing nested hierarchies of information.
26 lines (25 loc) • 718 B
TypeScript
import React, { type ReactElement } from 'react';
import { type RowProps } from '../row';
import { type RowsProps } from '../rows';
type ItemProps<Item> = {
/**
* @default 0
*/
depth?: number;
data: Item & {
children?: Item[];
};
render: (arg: Item & {
children?: Item[];
}) => ReactElement<RowProps<Item> | RowsProps<Item>> | null;
loadingLabel?: string;
key?: string;
};
/**
* __Item__
* Internal item component.
*/
declare function Item<Item extends {
id: string;
}>({ depth, data, render, loadingLabel, }: ItemProps<Item>): React.ReactElement<RowProps<Item> | RowsProps<Item>, string | React.JSXElementConstructor<any>> | null;
export default Item;