chore(react): cleanup base edge
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user