chore(ts-docs): add annotations for edges
This commit is contained in:
@@ -21,7 +21,34 @@ function createStepEdge(params: { isInternal: boolean }) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Component that can be used inside a custom edge to render a step edge.
|
||||
*
|
||||
* @public
|
||||
* @example
|
||||
*
|
||||
* ```tsx
|
||||
* import { StepEdge } from '@xyflow/react';
|
||||
*
|
||||
* function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {
|
||||
* return (
|
||||
* <StepEdge
|
||||
* sourceX={sourceX}
|
||||
* sourceY={sourceY}
|
||||
* targetX={targetX}
|
||||
* targetY={targetY}
|
||||
* sourcePosition={sourcePosition}
|
||||
* targetPosition={targetPosition}
|
||||
* />
|
||||
* );
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
const StepEdge = createStepEdge({ isInternal: false });
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const StepEdgeInternal = createStepEdge({ isInternal: true });
|
||||
|
||||
StepEdge.displayName = 'StepEdge';
|
||||
|
||||
Reference in New Issue
Block a user