Files
ragflow_python/web/src/pages/flow/canvas/node/index.tsx
balibabu 55fb96131e feat: build react flow nodes and edges from mock data #918 (#919)
### What problem does this PR solve?
feat: build react flow nodes and edges from mock data #918

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2024-05-27 08:21:30 +08:00

25 lines
532 B
TypeScript

import { Handle, NodeProps, Position } from 'reactflow';
import styles from './index.less';
export function TextUpdaterNode({
data,
isConnectable = true,
}: NodeProps<{ label: string }>) {
return (
<div className={styles.textUpdaterNode}>
<Handle
type="target"
position={Position.Left}
isConnectable={isConnectable}
/>
<Handle
type="source"
position={Position.Right}
isConnectable={isConnectable}
/>
<div>{data.label}</div>
</div>
);
}