Create PromptNode.tsx
Browse files- src/nodes/PromptNode.tsx +15 -0
src/nodes/PromptNode.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
import { Handle, Position } from 'reactflow';
|
| 3 |
+
|
| 4 |
+
export function PromptNode({ data }) {
|
| 5 |
+
return (
|
| 6 |
+
<>
|
| 7 |
+
<Handle type="target" position={Position.Top} />
|
| 8 |
+
<div>
|
| 9 |
+
<strong>{data.label}</strong>
|
| 10 |
+
<div>{data.prompt}</div>
|
| 11 |
+
</div>
|
| 12 |
+
<Handle type="source" position={Position.Bottom} />
|
| 13 |
+
</>
|
| 14 |
+
);
|
| 15 |
+
}
|