import React from "react"; import { Node, NodeProps } from "reaflow"; import useGraph from "src/hooks/store/useGraph"; import ObjectNode from "./ObjectNode"; import TextNode from "./TextNode"; export interface CustomNodeProps { width: number; height: number; value: T; isParent?: boolean; x: number; y: number; } export const CustomNode = (nodeProps: NodeProps) => { const { properties } = nodeProps; return ( }> {({ width, height, x, y, node }) => { if (Array.isArray(properties.text)) { return ( ); } return ( ); }} ); };