import Color from "chroma-js";
import { PencilIcon } from "components/Icons"
import { useNodeStyles } from "./styles"
import { Node, Point } from "types/graphs";
import { DAGEdge } from "./DAGEdge";
export interface NodeProp extends Node {
height: number;
width: number;
onXClick?: () => void;
onOpenClick?: () => void;
edge?: {
color: string;
loc: Point;
}
}
export const DAGNode = ({
loc: [x, y],
text,
height,
width,
onXClick = () => { },
onOpenClick = () => { },
color,
edge,
}: NodeProp) => {
const { classes, theme } = useNodeStyles({
color,
nodeHeight: height,
nodeWidth: width,
});
return <>
{edge && }
>
}