chore(react): cleanup base edge

This commit is contained in:
moklick
2024-12-04 12:17:35 +01:00
parent cc6b1d9717
commit 7a8e53463e
2 changed files with 2 additions and 22 deletions
@@ -2,10 +2,9 @@ import { isNumeric } from '@xyflow/system';
import cc from 'classcat';
import { EdgeText } from './EdgeText';
import type { BaseEdgeProps, EdgeComponentWithPathOptions, EdgeProps } from '../../types';
import type { BaseEdgeProps } from '../../types';
export function BaseEdge({
id,
path,
labelX,
labelY,
@@ -15,23 +14,12 @@ export function BaseEdge({
labelBgStyle,
labelBgPadding,
labelBgBorderRadius,
markerEnd,
markerStart,
className,
interactionWidth = 20,
...props
}: BaseEdgeProps) {
return (
<>
<path
{...props}
id={id}
d={path}
fill="none"
className={cc(['react-flow__edge-path', className])}
markerEnd={markerEnd}
markerStart={markerStart}
/>
<path {...props} d={path} fill="none" className={cc(['react-flow__edge-path', props.className])} />
{interactionWidth && (
<path
d={path}
-8
View File
@@ -130,14 +130,6 @@ export type BaseEdgeProps = Omit<SVGAttributes<SVGPathElement>, 'd'> &
labelX?: number;
/** The y position of edge label */
labelY?: number;
/** Marker at start of edge
* @example 'url(#arrow)'
*/
markerStart?: string;
/** Marker at end of edge
* @example 'url(#arrow)'
*/
markerEnd?: string;
/** SVG path of the edge */
path: string;
};