feat: changed startNode to use custom type for data

changed to startNode file to be a general file for custom node types, and created a custom type for the data property of StartNode.

BREAKING: renamed StartNode.tsx to NodeDefinitions.tsx

ref: N25B-114
This commit is contained in:
JGerla
2025-10-01 10:38:35 +02:00
parent e098ffebd6
commit b991e92c37
3 changed files with 19 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
import { Handle, Position } from '@xyflow/react';
import '@xyflow/react/dist/style.css';
import '../VisProgUI.css';
// Datatypes for NodeTypes
type startNodeData = { label: string; };
// Definitions of Nodes
export const StartNode= ({ data } : {data : startNodeData}) => {
return (
<>
<div>
<div className="default-node"> data test {data.label} </div>
<Handle type="source" position={Position.Right} id="start" />
</div>
</>
);
};
export default StartNode;