2024-04-28 19:03:54 +08:00
|
|
|
import { Handle, NodeProps, Position } from 'reactflow';
|
|
|
|
|
|
|
|
|
|
import styles from './index.less';
|
|
|
|
|
|
|
|
|
|
export function TextUpdaterNode({
|
|
|
|
|
data,
|
|
|
|
|
isConnectable = true,
|
2024-05-27 08:21:30 +08:00
|
|
|
}: NodeProps<{ label: string }>) {
|
2024-04-28 19:03:54 +08:00
|
|
|
return (
|
|
|
|
|
<div className={styles.textUpdaterNode}>
|
|
|
|
|
<Handle
|
|
|
|
|
type="target"
|
2024-05-27 08:21:30 +08:00
|
|
|
position={Position.Left}
|
2024-04-28 19:03:54 +08:00
|
|
|
isConnectable={isConnectable}
|
|
|
|
|
/>
|
|
|
|
|
<Handle
|
|
|
|
|
type="source"
|
2024-05-27 08:21:30 +08:00
|
|
|
position={Position.Right}
|
2024-04-28 19:03:54 +08:00
|
|
|
isConnectable={isConnectable}
|
|
|
|
|
/>
|
2024-05-27 08:21:30 +08:00
|
|
|
<div>{data.label}</div>
|
2024-04-28 19:03:54 +08:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|