Skip to content

Commit 88e312c

Browse files
committed
RRN 0.62 + Simplify/update some dev dependencies versions
1 parent 35dfaef commit 88e312c

File tree

5 files changed

+325
-555
lines changed

5 files changed

+325
-555
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ yarn add @reason-react-native/checkbox
4646

4747
### Types
4848

49-
#### `checkBoxEvent`
49+
#### `CheckBoxEvent.t`
50+
51+
Assuming `checkboxEvent` is `CheckBoxEvent.t`, you can access
5052

5153
```reason
52-
type checkBoxEvent =
53-
ReactNative.Event.syntheticEvent({
54-
.
55-
"target": int,
56-
"value": bool,
57-
});
54+
checkboxEvent.nativeEvent.target // => int
55+
checkboxEvent.nativeEvent.value // => bool
5856
```
5957

6058
`value` represents value of the checkbox as updated by the event.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"access": "public"
66
},
77
"peerDependencies": {
8-
"@react-native-community/checkbox": "0.4.0",
9-
"reason-react": "^0.7.0",
10-
"reason-react-native": "^0.61.0"
8+
"@react-native-community/checkbox": "^0.4.0",
9+
"reason-react": "^0.9.0",
10+
"reason-react-native": "^0.62.0"
1111
},
1212
"repository": "https://github.com/reason-react-native/checkbox.git",
1313
"license": "MIT",
@@ -40,13 +40,13 @@
4040
"release": "npmpub"
4141
},
4242
"devDependencies": {
43-
"bs-platform": "^7.2.0",
44-
"husky": "^1.3.0",
45-
"lint-staged": "^10.1.1",
43+
"bs-platform": "^8.0.0",
44+
"husky": "^4.0.0",
45+
"lint-staged": "^10.0.0",
4646
"npmpub": "^5.0.0",
47-
"prettier": "^1.18.0",
48-
"reason-react": "^0.7.0",
49-
"reason-react-native": "^0.61.0"
47+
"prettier": "^2.0.0",
48+
"reason-react": "^0.9.0",
49+
"reason-react-native": "^0.62.0"
5050
},
5151
"prettier": {
5252
"trailingComma": "all",

src/ReactNativeCheckbox.bs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
'use strict';
22

3+
var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js");
34
var NativeElement$ReactNative = require("reason-react-native/src/elements/NativeElement.bs.js");
45

6+
Event$ReactNative.SyntheticEvent({});
57

6-
/* NativeElement-ReactNative Not a pure module */
8+
var CheckBoxEvent = {};
9+
10+
exports.CheckBoxEvent = CheckBoxEvent;
11+
/* Not a pure module */

src/ReactNativeCheckbox.re

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
include ReactNative.NativeElement;
21
open ReactNative;
2+
include NativeElement;
33

44
type tintColors;
55
[@bs.obj]
66
external tintColors: (~_true: int=?, ~_false: int=?, unit) => tintColors;
77

8-
type checkBoxEvent =
9-
Event.syntheticEvent({
10-
.
11-
"target": int,
12-
"value": bool,
8+
module CheckBoxEvent = {
9+
type payload = {
10+
target: int,
11+
value: bool,
12+
};
13+
14+
include Event.SyntheticEvent({
15+
type _payload = payload;
1316
});
17+
};
1418

1519
[@react.component] [@bs.module "@react-native-community/checkbox"]
1620
external make:
1721
(
1822
~ref: ref=?,
1923
// CheckBox common props
20-
~onChange: checkBoxEvent => unit=?,
24+
~onChange: CheckBoxEvent.t => unit=?,
2125
~onValueChange: bool => unit=?,
2226
~value: bool=?,
2327
// CheckBox Android props
@@ -50,7 +54,7 @@ external make:
5054
| `fade
5155
]
5256
=?,
53-
// View props
57+
// View props 0.62.0
5458
~accessibilityComponentType: [@bs.string] [
5559
| `none
5660
| `button
@@ -75,10 +79,21 @@ external make:
7579
| `header
7680
| `summary
7781
| `imagebutton
82+
| `article
83+
| `banner
84+
| `complementary
85+
| `contentinfo
86+
| `form
87+
| `list
88+
| `listitem
89+
| `main
90+
| `navigation
91+
| `region
7892
]
7993
=?,
80-
~accessibilityStates: array(AccessibilityState.t)=?,
94+
~accessibilityState: Accessibility.state=?,
8195
~accessibilityTraits: array(AccessibilityTrait.t)=?,
96+
~accessibilityValue: Accessibility.value=?,
8297
~accessibilityViewIsModal: bool=?,
8398
~accessible: bool=?,
8499
~collapsable: bool=?,
@@ -121,7 +136,16 @@ external make:
121136
~renderToHardwareTextureAndroid: bool=?,
122137
~shouldRasterizeIOS: bool=?,
123138
~style: Style.t=?,
124-
~testID: string=?
139+
~testID: string=?,
140+
~children: React.element=?,
141+
// React Native Web Props
142+
~onMouseDown: ReactEvent.Mouse.t => unit=?,
143+
~onMouseEnter: ReactEvent.Mouse.t => unit=?,
144+
~onMouseLeave: ReactEvent.Mouse.t => unit=?,
145+
~onMouseMove: ReactEvent.Mouse.t => unit=?,
146+
~onMouseOver: ReactEvent.Mouse.t => unit=?,
147+
~onMouseOut: ReactEvent.Mouse.t => unit=?,
148+
~onMouseUp: ReactEvent.Mouse.t => unit=?
125149
) =>
126150
React.element =
127151
"default";

0 commit comments

Comments
 (0)