mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #44866 react-d3-graph: Add onClickGraph GraphEventCallbacks interface by @santina
* Add onClickGraph GraphEventCallbacks interface * Modify test
This commit is contained in:
parent
391b3b74a0
commit
7df1c11046
1
types/react-d3-graph/index.d.ts
vendored
1
types/react-d3-graph/index.d.ts
vendored
@ -114,6 +114,7 @@ export interface GraphData<N extends GraphNode, L extends GraphLink> {
|
||||
}
|
||||
|
||||
export interface GraphEventCallbacks {
|
||||
onClickGraph: (event: MouseEvent) => void;
|
||||
onClickNode: (nodeId: string) => void;
|
||||
onDoubleClickNode: (nodeId: string) => void;
|
||||
onRightClickNode: (event: MouseEvent, nodeId: string) => void;
|
||||
|
||||
@ -6,6 +6,7 @@ export class Example extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
<Graph
|
||||
onClickGraph={() => {}}
|
||||
id="test"
|
||||
data={{
|
||||
nodes: [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user