chore(examples): only use bundle

This commit is contained in:
moklick
2022-08-09 18:55:32 +02:00
parent affae72f7e
commit 0f835a2961
48 changed files with 194 additions and 513 deletions
@@ -1,15 +1,8 @@
import React, { memo, FC } from 'react';
import {
Handle,
Position,
NodeProps,
Connection,
Edge,
} from '@react-flow/core';
import { Handle, Position, NodeProps, Connection, Edge } from '@react-flow/bundle';
const onConnect = (params: Connection | Edge) =>
console.log('handle onConnect', params);
const onConnect = (params: Connection | Edge) => console.log('handle onConnect', params);
const labelStyle = {
display: 'flex',
@@ -28,12 +21,11 @@ const dragHandleStyle = {
const ColorSelectorNode: FC<NodeProps> = () => {
return (
<>
<Handle type='target' position={Position.Left} onConnect={onConnect} />
<Handle type="target" position={Position.Left} onConnect={onConnect} />
<div style={labelStyle}>
Only draggable here {' '}
<span className='custom-drag-handle' style={dragHandleStyle} />
Only draggable here <span className="custom-drag-handle" style={dragHandleStyle} />
</div>
<Handle type='source' position={Position.Right} />
<Handle type="source" position={Position.Right} />
</>
);
};