/* eslint-disable react-perf/jsx-no-new-object-as-prop */ /* eslint-disable react-perf/jsx-no-new-function-as-prop */ import { PAPER_CLASSNAME, PRIMARY } from 'storybook-config/theme'; import { createElements, createLinks, GraphProvider, Paper, type GraphProps, type InferElement, type RenderElement, } from '@joint/react'; import { useCallback } from 'react'; import { HTMLNode } from 'storybook-config/decorators/with-simple-data'; const initialElements = createElements([ { id: '1', label: 'Node 1', x: 100, y: 0 }, { id: '2', label: 'Node 2', x: 100, y: 200 }, ]); const initialEdges = createLinks([ { id: 'e1-2', source: '1', target: '2', attrs: { line: { stroke: PRIMARY, strokeWidth: 2, strokeDasharray: '5,5', }, }, }, ]); type BaseElementWithData = InferElement; function Main() { const renderElement: RenderElement = useCallback( (element) => {element.label}, [] ); return (
); } export default function App(props: Readonly) { return (
); }