import React from 'react'; import PropTypes from 'prop-types'; import Item from './Item'; import { ComponentProps } from '../utils/types'; type RemoveNodeHandler = (id: string) => void; type SetNodeHandler = (id: string, path?: string) => void; interface TreePropsBase { /** Should contain `Tree.Item`s, can also include other elements to display in between tree items. */ children?: React.ReactNode; /** Removes default indent from list styles if set to false. */ defaultIndent?: boolean; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; } type TreeProps = ComponentProps; /** * Used to present a hierarchical list. */ declare function Tree({ children, defaultIndent, elementRef, ...otherProps }: TreeProps): React.JSX.Element; declare namespace Tree { var propTypes: { children: PropTypes.Requireable; defaultIndent: PropTypes.Requireable; elementRef: PropTypes.Requireable; }; var Item: typeof import("./Item").default; } export default Tree; export { RemoveNodeHandler, SetNodeHandler, Item };