refactor(examples): update custom node example, create rich example

This commit is contained in:
moklick
2019-10-23 20:38:36 +02:00
parent 5acfacb885
commit 6a4c43df4b
30 changed files with 569 additions and 2574 deletions
+2 -1
View File
@@ -7,8 +7,9 @@ interface ConnectionLineProps {
connectionLineType?: string | null;
nodes: Node[];
transform: Transform;
isInteractive: boolean;
connectionLineStyle?: SVGAttributes<{}>;
className?: string;
}
declare const _default: ({ connectionSourceId, connectionLineStyle, connectionPositionX, connectionPositionY, connectionLineType, nodes, className, transform, }: ConnectionLineProps) => JSX.Element | null;
declare const _default: ({ connectionSourceId, connectionLineStyle, connectionPositionX, connectionPositionY, connectionLineType, nodes, className, transform, isInteractive, }: ConnectionLineProps) => JSX.Element | null;
export default _default;
+2 -1
View File
@@ -8,6 +8,7 @@ interface EdgeWrapperProps {
onClick: (edge: Edge) => void;
animated: boolean;
selected: boolean;
isInteractive: boolean;
}
declare const _default: (EdgeComponent: React.ComponentType<EdgeCompProps>) => React.MemoExoticComponent<({ id, source, target, type, animated, selected, onClick, ...rest }: EdgeWrapperProps) => JSX.Element>;
declare const _default: (EdgeComponent: React.ComponentType<EdgeCompProps>) => React.MemoExoticComponent<({ id, source, target, type, animated, selected, onClick, isInteractive, ...rest }: EdgeWrapperProps) => JSX.Element>;
export default _default;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference types="react" />
import { NodeProps } from '../../types';
declare const _default: ({ data, style }: NodeProps) => JSX.Element;
declare const _default: ({ data, targetPosition, sourcePosition, style }: NodeProps) => JSX.Element;
export default _default;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference types="react" />
import { NodeProps } from '../../types';
declare const _default: ({ data, style }: NodeProps) => JSX.Element;
declare const _default: ({ data, style, sourcePosition }: NodeProps) => JSX.Element;
export default _default;
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference types="react" />
import { NodeProps } from '../../types';
declare const _default: ({ data, style }: NodeProps) => JSX.Element;
declare const _default: ({ data, style, targetPosition }: NodeProps) => JSX.Element;
export default _default;
+1 -1
View File
@@ -1,4 +1,4 @@
import React from 'react';
import { NodeComponentProps, WrapNodeProps } from '../../types';
declare const _default: (NodeComponent: React.ComponentType<NodeComponentProps>) => React.MemoExoticComponent<({ id, type, data, transform, xPos, yPos, selected, onClick, onNodeDragStop, style, isInteractive, }: WrapNodeProps) => JSX.Element>;
declare const _default: (NodeComponent: React.ComponentType<NodeComponentProps>) => React.MemoExoticComponent<({ id, type, data, transform, xPos, yPos, selected, onClick, onNodeDragStop, style, isInteractive, sourcePosition, targetPosition, }: WrapNodeProps) => JSX.Element>;
export default _default;
+4 -1
View File
@@ -1,3 +1,6 @@
import React from 'react';
declare const _default: React.MemoExoticComponent<() => JSX.Element | null>;
declare type UserSelectionProps = {
isInteractive: boolean;
};
declare const _default: React.MemoExoticComponent<({ isInteractive }: UserSelectionProps) => JSX.Element | null>;
export default _default;