import { register } from "@antv/x6-react-shape"; import { Node } from "@antv/x6"; const NodeComponent = ({ node }: { node: Node }) => { const { width, height, backgroundColor, showWatermark, watermarkText, grid, gridSize, } = node.getData<{ isPage: boolean; width: number; height: number; backgroundColor: string; showWatermark: boolean; watermarkText: string; grid: boolean; gridSize: number; }>(); const base = 40 + (gridSize - 10) * 4; return (
{showWatermark && watermarkText}
); }; register({ shape: "page-container-node", width: 100, height: 100, component: NodeComponent, });