// import { AddButton } from "../AddButton/AddButton.jsx"; // import { Menu, Dropdown } from "antd"; // import "./EdgeAddButton.scss"; // const EdgeAddButton = (props) => { // const { style, data, id } = props; // console.log(id); // const content = ( // data.onAddNodeCallback({ id, type: event.key })} // > // Email // SMS // Rule // End // // ); // return ( //
// // // //
// ); // }; // export default EdgeAddButton; // ============================ // import { AddButton } from "../AddButton/AddButton.jsx"; import { Menu, Dropdown, Button } from "antd"; import "./EdgeAddButton.scss"; import { useState } from "react"; import { Handle, Position } from "reactflow"; import styles from "./nodes.module.scss"; // import DropzoneNode from "./DropzoneNode.jsx"; const EdgeAddButton = (props) => { const { style, data, id } = props; const dropzone =
+
; return (
data.onAddNodeCallback({ id, type: event.dataTransfer.getData("nodeType"), }) } onDragOver={(event) => event.preventDefault()} > {dropzone}
); }; export default EdgeAddButton;