@papernote/ui
Version:
A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive
26 lines • 887 B
TypeScript
import React from 'react';
export interface TreeNode {
id: string;
label: string;
icon?: React.ReactNode;
children?: TreeNode[];
disabled?: boolean;
}
export interface TreeViewProps {
/** Tree data structure */
data: TreeNode[];
/** Callback when node is selected */
onSelect?: (nodeId: string) => void;
/** Currently selected node ID */
selectedId?: string;
/** Initially expanded node IDs */
defaultExpanded?: string[];
/** Show lines connecting nodes */
showLines?: boolean;
/** Custom expand icon */
expandIcon?: React.ReactNode;
/** Custom collapse icon */
collapseIcon?: React.ReactNode;
}
export default function TreeView({ data, onSelect, selectedId, defaultExpanded, showLines, expandIcon, collapseIcon, }: TreeViewProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=TreeView.d.ts.map