@@ -3,13 +3,15 @@ import React, { memo } from 'react';
|
||||
import Handle from '../../components/Handle';
|
||||
import { NodeProps, Position } from '../../types';
|
||||
|
||||
const DefaultNode = memo(({ data, targetPosition = Position.Top, sourcePosition = Position.Bottom }: NodeProps) => (
|
||||
<>
|
||||
<Handle type="target" position={targetPosition} />
|
||||
{data.label}
|
||||
<Handle type="source" position={sourcePosition} />
|
||||
</>
|
||||
));
|
||||
const DefaultNode = memo(
|
||||
({ data, isConnectable, targetPosition = Position.Top, sourcePosition = Position.Bottom }: NodeProps) => (
|
||||
<>
|
||||
<Handle type="target" position={targetPosition} isConnectable={isConnectable} />
|
||||
{data.label}
|
||||
<Handle type="source" position={sourcePosition} isConnectable={isConnectable} />
|
||||
</>
|
||||
)
|
||||
);
|
||||
|
||||
DefaultNode.displayName = 'DefaultNode';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user