UNPKG

@xyflow/react

Version:

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

27 lines 1.07 kB
import type { NodeResizerProps } from './types'; /** * The `<NodeResizer />` component can be used to add a resize functionality to your * nodes. It renders draggable controls around the node to resize in all directions. * @public * * @example *```jsx *import { memo } from 'react'; *import { Handle, Position, NodeResizer } from '@xyflow/react'; * *function ResizableNode({ data }) { * return ( * <> * <NodeResizer minWidth={100} minHeight={30} /> * <Handle type="target" position={Position.Left} /> * <div style={{ padding: 10 }}>{data.label}</div> * <Handle type="source" position={Position.Right} /> * </> * ); *}; * *export default memo(ResizableNode); *``` */ export declare function NodeResizer({ nodeId, isVisible, handleClassName, handleStyle, lineClassName, lineStyle, color, minWidth, minHeight, maxWidth, maxHeight, keepAspectRatio, autoScale, shouldResize, onResizeStart, onResize, onResizeEnd, }: NodeResizerProps): import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=NodeResizer.d.ts.map