From a4fc108bbbe0f43881ebc012b18ce613149c50b5 Mon Sep 17 00:00:00 2001 From: Alessandro Date: Mon, 28 Jul 2025 13:35:30 +0200 Subject: [PATCH] react test --- examples/react/src/examples/Edges/index.tsx | 86 +++++++++++++++------ 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/examples/react/src/examples/Edges/index.tsx b/examples/react/src/examples/Edges/index.tsx index 6e18d24a..5ef76859 100644 --- a/examples/react/src/examples/Edges/index.tsx +++ b/examples/react/src/examples/Edges/index.tsx @@ -70,6 +70,18 @@ const initialNodes: Node[] = [ data: { label: 'Output 10' }, position: { x: 50, y: 400 }, }, + { + id: '11', + type: 'output', + data: { label: 'Output 11' }, + position: { x: 825, y: 400 }, + }, + { + id: '12', + type: 'output', + data: { label: 'Output 12' }, + position: { x: 825, y: 300 }, + }, ]; const initialEdges: Edge[] = [ @@ -182,6 +194,26 @@ const initialEdges: Edge[] = [ height: 20, }, }, + { + id: 'e4-11', + source: '4', + target: '11', + label: 'Explicit Red Color (should override CSS)', + markerEnd: { + type: MarkerType.ArrowClosed, + color: '#ff0000', + }, + }, + { + id: 'e4-12', + source: '4', + target: '12', + label: 'No Explicit Color (should use CSS variable)', + markerEnd: { + type: MarkerType.ArrowClosed, + color: null, + }, + }, ]; const edgeTypes: EdgeTypes = { @@ -205,28 +237,38 @@ const EdgesFlow = () => { const onConnect = useCallback((params: Connection | Edge) => setEdges((eds) => addEdge(params, eds)), [setEdges]); return ( - - - - - +
+ + + + + + +
); };