import { BaseEdge, type Edge, EdgeLabelRenderer, type EdgeProps, getBezierPath, } from '@xyflow/react'; import React, { type FC } from 'react'; import { useTheme } from './theme.ts'; export const CustomEdge: FC>> = React.memo( ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, label, markerEnd, markerStart, interactionWidth, }) => { const theme = useTheme(); const [path, labelX, labelY] = getBezierPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, }); return ( <>
{label}
); }, );