refactor(callbacks): dont provide noops as defaults, but make cbs optional
This commit is contained in:
+5
-4
@@ -108,7 +108,8 @@ export interface NodeComponentProps {
|
||||
yPos?: number;
|
||||
targetPosition?: Position;
|
||||
sourcePosition?: Position;
|
||||
onClick?: (node: Node) => void | undefined;
|
||||
onClick?: (node: Node) => void;
|
||||
onNodeDragStart?: (node: Node) => void;
|
||||
onNodeDragStop?: (node: Node) => void;
|
||||
style?: CSSProperties;
|
||||
}
|
||||
@@ -122,9 +123,9 @@ export interface WrapNodeProps {
|
||||
xPos: number;
|
||||
yPos: number;
|
||||
isInteractive: boolean;
|
||||
onClick: (node: Node) => void | undefined;
|
||||
onNodeDragStart: (node: Node) => void;
|
||||
onNodeDragStop: (node: Node) => void;
|
||||
onClick?: (node: Node) => void;
|
||||
onNodeDragStart?: (node: Node) => void;
|
||||
onNodeDragStop?: (node: Node) => void;
|
||||
style?: CSSProperties;
|
||||
sourcePosition?: Position;
|
||||
targetPosition?: Position;
|
||||
|
||||
Reference in New Issue
Block a user