UNPKG

@headless-tree/react

Version:

The definitive tree component for the Web

14 lines (10 loc) 690 B
import React, { HTMLProps } from 'react'; import * as _headless_tree_core from '@headless-tree/core'; import { TreeInstance, DndState, AssistiveDndState, HotkeysConfig, TreeConfig } from '@headless-tree/core'; declare const getDefaultLabel: <T>(dnd: DndState<T> | null | undefined, assistiveState: AssistiveDndState, hotkeys: HotkeysConfig<T>) => string; declare const AssistiveTreeDescription: <T>({ tree, getLabel, ...props }: { tree: TreeInstance<T>; getLabel?: typeof getDefaultLabel; } & HTMLProps<HTMLSpanElement>) => React.JSX.Element; declare const useTree: <T>(config: TreeConfig<T>) => _headless_tree_core.TreeInstance<T>; export { AssistiveTreeDescription, useTree };