refactor(examples): update custom node example, create rich example

This commit is contained in:
moklick
2019-10-23 20:38:36 +02:00
parent 5acfacb885
commit 6a4c43df4b
30 changed files with 569 additions and 2574 deletions
+3 -3
View File
@@ -10,10 +10,10 @@ const nodeStyles: CSSProperties = {
width: 150,
};
export default ({ data, style }: NodeProps) => (
export default ({ data, targetPosition = Position.Top, sourcePosition = Position.Bottom, style }: NodeProps) => (
<div style={{ ...nodeStyles, ...style }}>
<Handle type="target" position={Position.Top} />
<Handle type="target" position={targetPosition} />
{data.label}
<Handle type="source" position={Position.Bottom} />
<Handle type="source" position={sourcePosition} />
</div>
);