reablocks
Version:
Component library for React
35 lines (33 loc) • 788 B
TypeScript
import { TreeTheme } from './TreeTheme';
import { ReactNode, FC, PropsWithChildren } from 'react';
export interface TreeNodeProps extends PropsWithChildren {
/**
* Label to display for the node
*/
label?: ReactNode | string;
/**
* CSS Classname to apply to the node
*/
className?: string;
/**
* Whether the node is expanded or not
*/
expanded?: boolean;
/**
* Whether the node is disabled or not
*/
disabled?: boolean;
/**
* Theme for the Tree
*/
theme?: TreeTheme;
/**
* Event fired when the node is expanded
*/
onExpand?: () => void;
/**
* Event fired when the node is collapsed
*/
onCollapse?: () => void;
}
export declare const TreeNode: FC<TreeNodeProps>;