import React from "react"; import { type NodeModel } from "@minoru/react-dnd-treeview"; import { type CustomData } from "./types"; import { TypeIcon } from "./TypeIcon"; type Props = { node: NodeModel; depth: number; isOpen: boolean; onToggle: (id: NodeModel["id"]) => void; }; export const CustomNode: React.FC = (props) => { const { droppable, id, text } = props.node; const indent = props.depth * 24; const handleToggle = (e: React.MouseEvent) => { if (!droppable) return; e.stopPropagation(); props.onToggle(id); }; return (
{text}
); };