chore(lib): rename
This commit is contained in:
@@ -30,7 +30,7 @@ This is a very basic example of how to use react-flow. There are more advanced e
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Graph from 'react-flow';
|
import Graph from 'react-flow-renderer';
|
||||||
|
|
||||||
const elements = [
|
const elements = [
|
||||||
{ id: '1', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
|
{ id: '1', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
|
||||||
|
|||||||
Generated
+10651
-296
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-flow": "file:../",
|
"react-flow-renderer": "file:../",
|
||||||
"react-router-dom": "^5.1.2",
|
"react-router-dom": "^5.1.2",
|
||||||
"react-scripts": "3.4.1"
|
"react-scripts": "3.4.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import Graph, { removeElements, addEdge } from 'react-flow';
|
import Graph, { removeElements, addEdge } from 'react-flow-renderer';
|
||||||
|
|
||||||
const onNodeDragStop = node => console.log('drag stop', node);
|
const onNodeDragStop = node => console.log('drag stop', node);
|
||||||
const onLoad = graphInstance => console.log('graph loaded:', graphInstance);
|
const onLoad = graphInstance => console.log('graph loaded:', graphInstance);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Handle } from 'react-flow';
|
import { Handle } from 'react-flow-renderer';
|
||||||
|
|
||||||
export default ({ data, styles }) => {
|
export default ({ data, styles }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
import Graph, { isEdge, removeElements, addEdge, MiniMap, Controls } from 'react-flow';
|
import Graph, { isEdge, removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer';
|
||||||
|
|
||||||
import ColorSelectorNode from './ColorSelectorNode';
|
import ColorSelectorNode from './ColorSelectorNode';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import Graph, { removeElements, addEdge, MiniMap, Controls } from 'react-flow';
|
import Graph, { removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer';
|
||||||
|
|
||||||
const onNodeDragStop = node => console.log('drag stop', node);
|
const onNodeDragStop = node => console.log('drag stop', node);
|
||||||
const onLoad = graphInstance => console.log('graph loaded:', graphInstance);
|
const onLoad = graphInstance => console.log('graph loaded:', graphInstance);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import Graph, { MiniMap, Controls } from 'react-flow';
|
import Graph, { MiniMap, Controls } from 'react-flow-renderer';
|
||||||
|
|
||||||
const initialElements = [
|
const initialElements = [
|
||||||
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
|
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import Graph, { removeElements, addEdge, MiniMap, Controls } from 'react-flow';
|
import Graph, { removeElements, addEdge, MiniMap, Controls } from 'react-flow-renderer';
|
||||||
|
|
||||||
const onNodeDragStop = node => console.log('drag stop', node);
|
const onNodeDragStop = node => console.log('drag stop', node);
|
||||||
const onElementClick = element => console.log('click', element);
|
const onElementClick = element => console.log('click', element);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import Graph, { removeElements, addEdge, MiniMap } from 'react-flow';
|
import Graph, { removeElements, addEdge, MiniMap } from 'react-flow-renderer';
|
||||||
import { getElements } from './utils';
|
import { getElements } from './utils';
|
||||||
|
|
||||||
const onLoad = graph => {
|
const onLoad = graph => {
|
||||||
|
|||||||
Reference in New Issue
Block a user