diff --git a/example/src/Basic/index.js b/example/src/Basic/index.js index 856248ad..ca736bed 100644 --- a/example/src/Basic/index.js +++ b/example/src/Basic/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import Graph, { removeElements, addEdge } from 'react-flow-renderer'; +import ReactFlow, { removeElements, addEdge } from 'react-flow-renderer'; const onNodeDragStop = node => console.log('drag stop', node); const onLoad = graphInstance => console.log('graph loaded:', graphInstance); @@ -22,7 +22,7 @@ const BasicGraph = () => { const onConnect = (params) => setElements(els => addEdge(params, els)); return ( - { const onConnect = (params) => setElements(els => addEdge(params, els)); return ( - { }} /> - + ); } diff --git a/example/src/Edges/index.js b/example/src/Edges/index.js index c99f36d5..633123b7 100644 --- a/example/src/Edges/index.js +++ b/example/src/Edges/index.js @@ -16,7 +16,7 @@ const initialElements = [ { id: '5', data: { label: 'Node 5' }, position: { x: 450, y: 400 } }, { id: '6', type: 'output', data: { label: 'Output Node 5' }, position: { x: 250, y: 550 } }, { id: '7', type: 'output', data: { label: 'Output Node 6' }, position: { x: 550, y: 550 } }, - { id: 'e1-2', source: '1', target: '2', label: 'bezier edge', labelBgStyle: { fillOpacity: 0.75 } }, + { id: 'e1-2', source: '1', target: '2', label: 'bezier edge' }, { id: 'e2-3', source: '2', target: '3', type: 'step', label: 'step edge' }, { id: 'e3-4', source: '3', target: '4', type: 'straight', label: 'straight edge' }, { id: 'e3-5', source: '4', target: '5', animated: true, label: 'animated styled edge', style: { stroke: 'red' } }, diff --git a/example/src/Empty/index.js b/example/src/Empty/index.js index df4b8809..710b47a2 100644 --- a/example/src/Empty/index.js +++ b/example/src/Empty/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import Graph, { removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer'; +import ReactFlow, { removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer'; const onNodeDragStop = node => console.log('drag stop', node); const onLoad = graphInstance => console.log('graph loaded:', graphInstance); @@ -22,7 +22,7 @@ const EmptyGraph = () => { }; return ( - { > add node - + ); } diff --git a/example/src/Inactive/index.js b/example/src/Inactive/index.js index 3178abfe..007f9527 100644 --- a/example/src/Inactive/index.js +++ b/example/src/Inactive/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import Graph, { MiniMap, Controls } from 'react-flow-renderer'; +import ReactFlow, { MiniMap, Controls } from 'react-flow-renderer'; const initialElements = [ { id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } }, @@ -18,7 +18,7 @@ const EmptyGraph = () => { }; return ( - { /> - + ); } diff --git a/example/src/Rich/index.js b/example/src/Rich/index.js index 13820c8f..0cd4cc89 100644 --- a/example/src/Rich/index.js +++ b/example/src/Rich/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import Graph, { removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer'; +import ReactFlow, { removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer'; const onNodeDragStop = node => console.log('drag stop', node); const onElementClick = element => console.log('click', element); @@ -41,7 +41,7 @@ const RichGraph = () => { const onConnect = (params) => setElements(els => addEdge(params, els)); return ( - { > add node - + ); } diff --git a/example/src/Stress/index.js b/example/src/Stress/index.js index cc7b64f8..5046fba3 100644 --- a/example/src/Stress/index.js +++ b/example/src/Stress/index.js @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import Graph, { removeElements, addEdge, MiniMap } from 'react-flow-renderer'; +import ReactFlow, { removeElements, addEdge, MiniMap } from 'react-flow-renderer'; import { getElements } from './utils'; const onLoad = graph => { @@ -17,7 +17,7 @@ const StressGraph = () => { const onConnect = (params) => setElements(els => addEdge(params, els)); return ( - { backgroundType="lines" > - + ); } diff --git a/example/src/index.js b/example/src/index.js index 5428f627..76b5ed84 100644 --- a/example/src/index.js +++ b/example/src/index.js @@ -20,7 +20,11 @@ const routes = [{ path: '/basic', component: Basic, label: 'Basic' -},{ +}, { + path: '/edges', + component: Edges, + label: 'Edges' +}, { path: '/custom-node', component: CustomNode, label: 'CustomNode' @@ -28,10 +32,6 @@ const routes = [{ path: '/stress', component: Stress, label: 'Stress' -}, { - path: '/edges', - component: Edges, - label: 'Edges' }, { path: '/empty', component: Empty