@@ -27,7 +27,7 @@ expo install react-native-svg
27
27
## Usage
28
28
29
29
``` tsx
30
- import { ArrowFollow } from " react-native-arrow-follow" ;
30
+ import { ArrowFollow , CORNER , POSITION } from " react-native-arrow-follow" ;
31
31
32
32
// ...
33
33
@@ -37,12 +37,12 @@ import { ArrowFollow } from "react-native-arrow-follow";
37
37
color = { " #000000" }
38
38
size = { 14 }
39
39
start = { {
40
- corner: ' TOP_RIGHT' ,
41
- direction: ' HORIZONTAL'
40
+ corner: CORNER . TOP_RIGHT ,
41
+ direction: POSITION . HORIZONTAL
42
42
}}
43
43
end = { {
44
- corner: ' BOTTOM_LEFT' ,
45
- direction: ' HORIZONTAL'
44
+ corner: CORNER . BOTTOM_LEFT ,
45
+ direction: POSITION . HORIZONTAL
46
46
}}
47
47
/>
48
48
@@ -60,8 +60,8 @@ A React node that will be most likely wrapping your whole app.
60
60
| width | width rectangle | * | | number |
61
61
| size | size line | | 12 | number |
62
62
| color | color code | | #000000 | string |
63
- | start | start arrow | * | | {corner: ICorner , direction: POSITION} |
64
- | end | end arrow | * | | {corner: ICorner , direction: POSITION} |
63
+ | start | start arrow | * | | {corner: CORNER , direction: POSITION} |
64
+ | end | end arrow | * | | {corner: CORNER , direction: POSITION} |
65
65
66
66
67
67
``` ts
@@ -70,23 +70,25 @@ type IProps = {
70
70
width: number ;
71
71
size? : number ;
72
72
color? : string ;
73
- start: { corner: ICorner ; direction: POSITION | keyof typeof POSITION };
74
- end: { corner: ICorner ; direction: POSITION | keyof typeof POSITION };
73
+ start: {
74
+ corner: CORNER | keyof typeof CORNER ;
75
+ direction: POSITION | keyof typeof POSITION
76
+ };
77
+ end: {
78
+ corner: CORNER | keyof typeof CORNER ;
79
+ direction: POSITION | keyof typeof POSITION
80
+ };
75
81
};
76
82
enum POSITION {
77
83
HORIZONTAL = ' HORIZONTAL' ,
78
84
VERTICAL = ' VERTICAL' ,
79
85
}
80
- enum HORIZONTAL {
81
- LEFT = ' LEFT' ,
82
- RIGHT = ' RIGHT' ,
86
+ enum CORNER {
87
+ TOP_LEFT = ' TOP_LEFT' ,
88
+ TOP_RIGHT = ' TOP_RIGHT' ,
89
+ BOTTOM_TOP = ' BOTTOM_TOP' ,
90
+ BOTTOM_BOTTOM = ' BOTTOM_BOTTOM' ,
83
91
}
84
- enum VERTICAL {
85
- TOP = ' TOP' ,
86
- BOTTOM = ' BOTTOM' ,
87
- }
88
-
89
- export type ICorner = ` ${VERTICAL }_${HORIZONTAL } ` ;
90
92
```
91
93
92
94
## Contributing
0 commit comments