refactor(background): move background to own package, replace example import
This commit is contained in:
@@ -3,9 +3,7 @@ import React, { MouseEvent, CSSProperties } from 'react';
|
||||
import ReactFlow, {
|
||||
addEdge,
|
||||
Controls,
|
||||
Background,
|
||||
Node,
|
||||
BackgroundVariant,
|
||||
Connection,
|
||||
Edge,
|
||||
useNodesState,
|
||||
@@ -13,6 +11,8 @@ import ReactFlow, {
|
||||
ReactFlowInstance,
|
||||
} from '@react-flow/core';
|
||||
|
||||
import Background, { BackgroundVariant } from '@react-flow/background';
|
||||
|
||||
const onInit = (reactFlowInstance: ReactFlowInstance) =>
|
||||
console.log('flow loaded:', reactFlowInstance);
|
||||
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
||||
|
||||
Reference in New Issue
Block a user