dify/web/app/components/base/prompt-editor/plugins/tree-view.tsx

20 lines
655 B
TypeScript
Raw Normal View History

import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
import { TreeView } from '@lexical/react/LexicalTreeView'
const TreeViewPlugin = () => {
const [editor] = useLexicalComposerContext()
return (
<TreeView
viewClassName="tree-view-output"
treeTypeButtonClassName="debug-treetype-button"
timeTravelPanelClassName="debug-timetravel-panel"
timeTravelButtonClassName="debug-timetravel-button"
timeTravelPanelSliderClassName="debug-timetravel-panel-slider"
timeTravelPanelButtonClassName="debug-timetravel-panel-button"
editor={editor}
/>
)
}
export default TreeViewPlugin