Created
March 5, 2020 14:03
-
-
Save vojto/e6d6c9c5f2805b1e4918835ae977c3d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import {Stage} from "@inlet/react-pixi"; | |
export const Graph: React.FC<{ | |
nodes: Node[]; | |
edges: Edge[]; | |
}> = (props) => { | |
return ( | |
<Stage> | |
{props.edges.map((edge) => { | |
<EdgeView edge={edge} />; | |
})} | |
{props.nodes.map((node) => { | |
<NodeView node={node} />; | |
})} | |
</Stage> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment