fix(react) added internal edge components, to make id, source, handle optional on exported edges
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { memo, useMemo } from 'react';
|
||||
import { Optional } from '@xyflow/system';
|
||||
|
||||
import SmoothStepEdge from './SmoothStepEdge';
|
||||
import type { SmoothStepEdgeProps } from '../../types';
|
||||
|
||||
const StepEdge = memo((props: SmoothStepEdgeProps) => (
|
||||
const StepEdge = memo((props: Optional<SmoothStepEdgeProps, 'id' | 'source' | 'target'>) => (
|
||||
<SmoothStepEdge
|
||||
{...props}
|
||||
pathOptions={useMemo(() => ({ borderRadius: 0, offset: props.pathOptions?.offset }), [props.pathOptions?.offset])}
|
||||
|
||||
Reference in New Issue
Block a user