File size: 1,181 Bytes
be99f83 dcce454 454aa85 dcce454 be99f83 78dc980 dcce454 454aa85 be99f83 dcce454 78dc980 dcce454 be99f83 dcce454 78dc980 dcce454 be99f83 454aa85 dcce454 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
import classNames from 'classnames';
import { Handle, NodeProps, Position } from 'reactflow';
import { Space } from 'antd';
import { Operator } from '../../constant';
import OperatorIcon from '../../operator-icon';
import styles from './index.less';
export function TextUpdaterNode({
data,
isConnectable = true,
selected,
}: NodeProps<{ label: string }>) {
return (
<section
className={classNames(styles.textUpdaterNode, {
[styles.selectedNode]: selected,
})}
>
<Handle
type="target"
position={Position.Left}
isConnectable={isConnectable}
className={styles.handle}
>
{/* <PlusCircleOutlined style={{ fontSize: 10 }} /> */}
</Handle>
<Handle
type="source"
position={Position.Right}
isConnectable={isConnectable}
className={styles.handle}
>
{/* <PlusCircleOutlined style={{ fontSize: 10 }} /> */}
</Handle>
<div>
<Space>
<OperatorIcon
name={data.label as Operator}
fontSize={12}
></OperatorIcon>
{data.label}
</Space>
</div>
</section>
);
}
|