forked from pierpo/react-archer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharcher-types.js
47 lines (41 loc) · 962 Bytes
/
archer-types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
declare type AnchorPositionType = 'top' | 'bottom' | 'left' | 'right' | 'middle';
declare type RelationType = {
targetId: string,
targetAnchor: AnchorPositionType,
sourceAnchor: AnchorPositionType,
label?: ?React$Node,
style?: LineType,
};
declare type EntityRelationType = {
id: string,
anchor: AnchorPositionType,
};
declare type SourceToTargetType = {
source: EntityRelationType,
target: EntityRelationType,
label?: ?React$Node,
style?: LineType,
};
declare type ShapeType = {
arrow?: {
arrowLength?: number,
arrowThickness?: number,
},
circle?: {
radius?: number,
fillColor?: string,
strokeColor?: string,
strokeWidth?: number,
},
};
declare type LineType = {
endShape?: ShapeType,
strokeColor?: string,
strokeWidth?: number,
strokeDasharray?: string,
noCurves?: boolean,
startMarker?: boolean,
endMarker?: boolean,
lineStyle?: string,
};
type ValidShapeTypes = 'arrow' | 'circle';