feat(types): Add NodeTypes and EdgeTypes
* Interface for passing an object of NodeTypes/EdgeTypes * Object needs to be passed with components markedRaw Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
Position,
|
||||
isEdge,
|
||||
FlowInstance,
|
||||
NodeTypes,
|
||||
} from '~/index'
|
||||
|
||||
const initialHandleCount = 1
|
||||
@@ -29,8 +30,8 @@ const initialElements: Elements = [
|
||||
|
||||
const buttonWrapperStyles: CSSProperties = { position: 'absolute', right: 10, top: 10, zIndex: 10 }
|
||||
|
||||
const nodeTypes: Record<string, NodeType> = {
|
||||
custom: CustomNode as NodeType,
|
||||
const nodeTypes: NodeTypes = {
|
||||
custom: CustomNode,
|
||||
}
|
||||
|
||||
let id = 5
|
||||
|
||||
Reference in New Issue
Block a user