UNPKG

@xyflow/react

Version:

React Flow - A highly customizable React library for building node-based editors and interactive flow charts.

26 lines 995 B
import type { EdgeToolbarProps } from './types'; /** * This component can render a toolbar or tooltip to one side of a custom edge. This * toolbar doesn't scale with the viewport so that the content stays the same size. * * @public * @example * ```jsx * import { EdgeToolbar, BaseEdge, getBezierPath, type EdgeProps } from "@xyflow/react"; * * export function CustomEdge({ id, data, ...props }: EdgeProps) { * const [edgePath, centerX, centerY] = getBezierPath(props); * * return ( * <> * <BaseEdge id={id} path={edgePath} /> * <EdgeToolbar edgeId={id} x={centerX} y={centerY} isVisible> * <button onClick={() => console.log('edge', id, 'click')}}>Click me</button> * </EdgeToolbar> * </> * ); * } * ``` */ export declare function EdgeToolbar({ edgeId, x, y, children, className, style, isVisible, alignX, alignY, ...rest }: EdgeToolbarProps): import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=EdgeToolbar.d.ts.map