From e8a9201d0d98237e95949d7b6c500caf2fd51ce1 Mon Sep 17 00:00:00 2001 From: Tieptk Date: Mon, 30 Sep 2024 09:22:58 +0700 Subject: [PATCH] add --- src/nodes/custom/CustomNode.tsx | 83 +++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/nodes/custom/CustomNode.tsx diff --git a/src/nodes/custom/CustomNode.tsx b/src/nodes/custom/CustomNode.tsx new file mode 100644 index 0000000..1dca10d --- /dev/null +++ b/src/nodes/custom/CustomNode.tsx @@ -0,0 +1,83 @@ +// CustomNode.tsx +import React, { memo } from 'react'; +import { Handle, Position } from '@xyflow/react'; + +interface NodeProps { + data: { + label: string; + }; + isConnectable: boolean; +} + +const CustomNode: React.FC = ({ data, isConnectable }) => { + return ( + <> + console.log('handle onConnect', params)} + isConnectable={isConnectable} + /> +
+ {data.label} +
+ +
+ Yes +
+ +
+ No +
+ + ); +}; + +export default memo(CustomNode);