import React from 'react'; import { BaseEdge, EdgeProps, getBezierPath, useReactFlow } from 'reactflow'; const ButtonEdge: React.FC = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style = {}, markerEnd, }) => { const [edgePath, edgeCenterX, edgeCenterY] = getBezierPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, }); const reactFlow = useReactFlow(); function onEdgeClick(event: React.MouseEvent, id: string) { event.stopPropagation(); reactFlow.setEdges(reactFlow.getEdges().filter(edge => edge.id !== id)); } return ( <> ); }; export default ButtonEdge;