UNPKG

@joint/react

Version:

React bindings and hooks for JointJS to build interactive diagrams and graphs.

22 lines (21 loc) 599 B
import { type JSX } from 'react'; import type { dia } from '@joint/core'; /** * Convert JSX element to JointJS markup. * @param element JSX element. * @returns JointJS markup. * * This generate just static markup from JSX, it doesn't support dynamic components and hooks. * @example * ```tsx * function CustomComponent(props: Readonly<PropsWithChildren>) { * return <div>{props.children}</div>; * } * const markup = jsxToMarkup( * <CustomComponent> * <span>Hello</span> * </CustomComponent> * ); * ``` */ export declare function jsx(element: JSX.Element): dia.MarkupJSON;