* fix(ts): use strict mode strictNullChecks etc * chore: Use extended React.HTMLAttributes<> (#41) * refactor(code-format): add prettier closes #42 * feat(renderer): add snap to grid option closes #20 * chore(dependabot): use develop as target branch
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import React, { SVGAttributes } from 'react';
|
|
import { Elements, NodeTypesType, EdgeTypesType, GridType, OnLoadFunc } from '../../types';
|
|
export interface GraphViewProps {
|
|
elements: Elements;
|
|
onElementClick: () => void;
|
|
onElementsRemove: (elements: Elements) => void;
|
|
onNodeDragStop: () => void;
|
|
onConnect: () => void;
|
|
onLoad: OnLoadFunc;
|
|
onMove: () => void;
|
|
selectionKeyCode: number;
|
|
nodeTypes: NodeTypesType;
|
|
edgeTypes: EdgeTypesType;
|
|
connectionLineType: string;
|
|
connectionLineStyle: SVGAttributes<{}>;
|
|
deleteKeyCode: number;
|
|
showBackground: boolean;
|
|
backgroundGap: number;
|
|
backgroundColor: string;
|
|
backgroundType: GridType;
|
|
snapToGrid: boolean;
|
|
snapGrid: [number, number];
|
|
}
|
|
declare const GraphView: React.MemoExoticComponent<({ nodeTypes, edgeTypes, onMove, onLoad, onElementClick, onNodeDragStop, connectionLineType, connectionLineStyle, selectionKeyCode, onElementsRemove, deleteKeyCode, elements, showBackground, backgroundGap, backgroundColor, backgroundType, onConnect, snapToGrid, snapGrid, }: GraphViewProps) => JSX.Element>;
|
|
export default GraphView;
|