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
+2 -2
View File
@@ -10,9 +10,9 @@ const nodeStyles: CSSProperties = {
width: 150,
};
export default ({ data, style }: NodeProps) => (
export default ({ data, style, sourcePosition = Position.Bottom }: NodeProps) => (
<div style={{ ...nodeStyles, ...style }}>
{data.label}
<Handle type="source" position={Position.Bottom} />
<Handle type="source" position={sourcePosition} />
</div>
);