import Color from "chroma-js"; import { PencilIcon } from "components/Icons" import { NodeColor } from "types/graphs"; import { useNodeStyles } from "./styles"; import { Handle, Position } from 'react-flow-renderer'; import { FC } from "react"; export interface DAGNodeProps { height: number; width: number; onXClick?: () => void; onEditClick?: () => void; color: NodeColor; label: string; hasInput?: boolean; } export const DAGNode: FC<{ data: DAGNodeProps }> = ({ data: { label, height, width, onXClick = () => { }, onEditClick = () => { }, color, hasInput = false, }, }) => { const { classes, theme } = useNodeStyles({ color, nodeHeight: height, nodeWidth: width, }); return <> {hasInput && }
{label}
{ console.log('editing me', label, onEditClick, onEditClick()) }}>
}