feat(nodetypes): custome types

This commit is contained in:
moklick
2019-07-16 13:06:47 +02:00
parent da1bf6f5ad
commit 587fb88fa3
7 changed files with 55 additions and 45 deletions

View File

@@ -1,13 +1,11 @@
import React, { PureComponent } from 'react';
import Graph from '../src';
import wrapNode from '../src/NodeRenderer/NodeTypes/wrapNode';
// import Graph from '../dist/ReactGraph';
const SpecialNode = wrapNode(({ data }) =>
const SpecialNode = ({ data }) =>
<div>I am Special!<br />{data.label}</div>
);
;
class App extends PureComponent {
constructor() {
@@ -27,7 +25,7 @@ class App extends PureComponent {
{ data: { source: '3', target: '5' } },
{ data: { source: '5', target: '6' } }
]
}
};
}
onLoad(graphInstance) {