UNPKG

ta-react-xarrows

Version:

Draw arrows (or lines) between components in React!

108 lines 3.35 kB
import React from 'react'; import { tAnchorEdge, tPaths, tSvgElems, tArrowShapes } from '.'; export declare type xarrowPropsType = { start: refType; end: refType; startAnchor?: anchorType | anchorType[]; endAnchor?: anchorType | anchorType[]; label?: labelType | labelsType; color?: string; lineColor?: string | null; headColor?: string | null; tailColor?: string | null; strokeWidth?: number; showHead?: boolean; headSize?: number; showTail?: boolean; tailSize?: number; path?: pathType; showXarrow?: boolean; curveness?: number; gridBreak?: number; dashness?: boolean | { strokeLen?: number; nonStrokeLen?: number; animation?: boolean | number; }; headShape?: svgEdgeShapeType | svgCustomEdgeType; tailShape?: svgEdgeShapeType | svgCustomEdgeType; animateDrawing?: boolean | number; passProps?: JSX.IntrinsicElements[svgElemType]; SVGcanvasProps?: React.SVGAttributes<SVGSVGElement>; arrowBodyProps?: React.SVGProps<SVGPathElement>; arrowHeadProps?: JSX.IntrinsicElements[svgElemType]; arrowTailProps?: JSX.IntrinsicElements[svgElemType]; divContainerProps?: React.HTMLProps<HTMLDivElement>; SVGcanvasStyle?: React.CSSProperties; divContainerStyle?: React.CSSProperties; _extendSVGcanvas?: number; _debug?: boolean; _cpx1Offset?: number; _cpy1Offset?: number; _cpx2Offset?: number; _cpy2Offset?: number; updatePositions?: updatePositionsType; }; export declare type curveType = { x1: number; y1: number; x2: number; y2: number; cpx1: number; cpy1: number; cpx2: number; cpy2: number; }; export declare type updatePositionType = { hh?: (arg1: curveType) => number[]; hv?: (arg1: curveType) => number[]; vh?: (arg1: curveType) => number[]; vv?: (arg1: curveType) => number[]; }; export declare type updatePositionsType = { smooth?: updatePositionType; grid?: updatePositionType; }; export declare type pathType = typeof tPaths[number]; export declare type anchorType = anchorPositionType | anchorCustomPositionType; export declare type anchorPositionType = typeof tAnchorEdge[number]; export declare type anchorCustomPositionType = { position: anchorPositionType; offset: { rightness?: number; bottomness?: number; }; }; export declare type refType = React.MutableRefObject<any> | string; export declare type labelsType = { start?: labelType; middle?: labelType; end?: labelType; }; export declare type labelType = JSX.Element | string; export declare type svgCustomTypeGeneric<T extends svgElemType> = { svgElem: T; svgProps?: JSX.IntrinsicElements[T]; offsetForward?: number; }; export declare type svgCustomEdgeType = { [K in svgElemType]: svgCustomTypeGeneric<K>; }[svgElemType]; export declare type svgEdgeShapeType = typeof tArrowShapes[number]; export declare type svgEdgeType = svgEdgeShapeType | svgCustomEdgeType; export declare type svgElemType = typeof tSvgElems[number]; export declare type _prevPosType = { start: { x: number; y: number; right: number; bottom: number; }; end: { x: number; y: number; right: number; bottom: number; }; }; //# sourceMappingURL=types.d.ts.map