1
- # ` @reason -react-native/image-editor `
1
+ # ` @rescript -react-native/image-editor `
2
2
3
- [ ![ Build Status] ( https://github.com/reason -react-native/image-editor/workflows/Build/badge.svg )] ( https://github.com/reason -react-native/image-editor/actions )
4
- [ ![ Version] ( https://img.shields.io/npm/v/@reason -react-native/image-editor.svg )] ( https://www.npmjs.com/@reason -react-native/image-editor )
5
- [ ![ Chat ] ( https://img.shields.io/discord/235176658175262720.svg?logo=discord&colorb=blue )] ( https://reason-react-native.github.io/discord / )
3
+ [ ![ Build Status] ( https://github.com/rescript -react-native/image-editor/workflows/Build/badge.svg )] ( https://github.com/rescript -react-native/image-editor/actions )
4
+ [ ![ Version] ( https://img.shields.io/npm/v/@rescript -react-native/image-editor.svg )] ( https://www.npmjs.com/@rescript -react-native/image-editor )
5
+ [ ![ ReScript Forum ] ( https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org )] ( https://forum.rescript-lang.org / )
6
6
7
- [ ReScript] ( https://rescript-lang.org ) / [ Reason ] ( https://reasonml.github.io ) bindings for
7
+ [ ReScript] ( https://rescript-lang.org ) bindings for
8
8
[ ` @react-native-community/image-editor ` ] ( https://github.com/react-native-image-editor/react-native-image-editor ) .
9
9
10
10
Exposed as ` ReactNativeImageEditor ` module.
11
11
12
- ` @reason -react-native/image-editor ` X.y.\* means it's compatible with
12
+ ` @rescript -react-native/image-editor ` X.y.\* means it's compatible with
13
13
` @react-native-community/image-editor ` X.y.\*
14
14
15
15
## Installation
@@ -20,22 +20,22 @@ is properly installed & configured by following their installation instructions,
20
20
you can install the bindings:
21
21
22
22
``` console
23
- npm install @reason -react-native/image-editor
23
+ npm install @rescript -react-native/image-editor
24
24
# or
25
- yarn add @reason -react-native/image-editor
25
+ yarn add @rescript -react-native/image-editor
26
26
```
27
27
28
- ` @reason -react-native/image-editor ` should be added to ` bs-dependencies ` in your
28
+ ` @rescript -react-native/image-editor ` should be added to ` bs-dependencies ` in your
29
29
` bsconfig.json ` :
30
30
31
31
``` diff
32
32
{
33
33
//...
34
34
"bs-dependencies": [
35
- "reason- react",
36
- "reason -react-native",
35
+ "@rescript/ react",
36
+ "rescript -react-native",
37
37
// ...
38
- + "@reason -react-native/image-editor"
38
+ + "@rescript -react-native/image-editor"
39
39
],
40
40
//...
41
41
}
@@ -50,23 +50,23 @@ successfully cropped, returns path of the resulting image as a `string`, wrapped
50
50
in a Promise. If a remote image cannot be downloaded or an image cannot be
51
51
cropped, the Promise will be rejected.
52
52
53
- ``` reason
53
+ ``` rescript
54
54
cropImage: (source, cropData) => Js.Promise.t(string)
55
55
```
56
56
57
57
### ` fromRequired `
58
58
59
59
To convert a ` ReactNative.Packager.required ` object into [ ` source ` ] ( #source ) .
60
60
61
- ``` reason
61
+ ``` rescript
62
62
fromRequired: ReactNative.Packager.required => source
63
63
```
64
64
65
65
### ` fromUriSource `
66
66
67
67
To convert a URI given as a ` string ` into [ ` source ` ] ( #source ) .
68
68
69
- ``` reason
69
+ ``` rescript
70
70
fromUriSource: string => source
71
71
```
72
72
@@ -82,7 +82,7 @@ An abstract type created using the [`fromRequired`](#fromrequired) and
82
82
An abstract type created using the constructor of the same name which takes
83
83
named arguments ` x ` and ` y ` of type ` int ` .
84
84
85
- ``` reason
85
+ ``` rescript
86
86
offset: (~x: int, ~y: int) => offset
87
87
```
88
88
@@ -91,7 +91,7 @@ offset: (~x: int, ~y: int) => offset
91
91
An abstract type created using the constructor of the same name which takes
92
92
named arguments ` width ` and ` height ` of type ` int ` .
93
93
94
- ``` reason
94
+ ``` rescript
95
95
size: (~width: int, ~height: int) => size
96
96
```
97
97
@@ -102,7 +102,7 @@ named arguments `offset` (of type `offset`) and `size` (of type `size`) and
102
102
optional arguments ` displaySize ` (of type ` size ` ) and ` resizeMode ` (one of
103
103
polymorphic variants `` `contain `` , `` `cover `` , `` `stretch `` ).
104
104
105
- ``` reason
105
+ ``` rescript
106
106
cropData: (
107
107
~offset: offset,
108
108
~size: size,
@@ -114,7 +114,7 @@ cropData: (
114
114
115
115
## Example
116
116
117
- ``` reason
117
+ ``` rescript
118
118
open ReactNative;
119
119
120
120
// hardcoding actual image dimensions
@@ -262,11 +262,11 @@ releases.
262
262
## Contribute
263
263
264
264
Read the
265
- [ contribution guidelines] ( https://github.com/reason -react-native/.github/blob/master/CONTRIBUTING.md )
265
+ [ contribution guidelines] ( https://github.com/rescript -react-native/.github/blob/master/CONTRIBUTING.md )
266
266
before contributing.
267
267
268
268
## Code of Conduct
269
269
270
270
We want this community to be friendly and respectful to each other. Please read
271
- [ our full code of conduct] ( https://github.com/reason -react-native/.github/blob/master/CODE_OF_CONDUCT.md )
271
+ [ our full code of conduct] ( https://github.com/rescript -react-native/.github/blob/master/CODE_OF_CONDUCT.md )
272
272
so that you can understand what actions will and will not be tolerated.
0 commit comments