Skip to content

Commit c4e791a

Browse files
committed
1 parent d7c09ca commit c4e791a

21 files changed

Lines changed: 73 additions & 48 deletions

‎bs-react-native-example/src/RNTesterExampleList.re‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let component = ReasonReact.statelessComponent("RNTesterExampleList");
3636

3737
let renderItem = onPress =>
3838
SectionList.renderItem(({item}) =>
39-
<TouchableHighlight onPress={() => onPress(item)}>
39+
<TouchableHighlight onPress={_ => onPress(item)}>
4040
<View style=styles##row>
4141
<Text style=styles##rowTitleText>
4242
{ReasonReact.string(item.ExampleList.title)}

‎bs-react-native-example/src/pages/ImageStoreExample.re‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module ImageExample = {
3030
render: self =>
3131
<View>
3232
<Button
33-
onPress={() => {
33+
onPress={_ => {
3434
ImageStore.hasImageForTag(
3535
switch (self.state.imageUri) {
3636
| Some(x) => x
@@ -49,7 +49,7 @@ module ImageExample = {
4949
accessibilityLabel="Has Image For Tag"
5050
/>
5151
<Button
52-
onPress={() => {
52+
onPress={_ => {
5353
ImageStore.addImageFromBase64(
5454
image,
5555
uri => self.send(SetImageUri(uri)),
@@ -62,7 +62,7 @@ module ImageExample = {
6262
accessibilityLabel="Set image uri"
6363
/>
6464
<Button
65-
onPress={() =>
65+
onPress={_ =>
6666
switch (self.state.imageUri) {
6767
| Some(uri) => ImageStore.removeImageForTag(uri)
6868
| None => ()
@@ -72,7 +72,7 @@ module ImageExample = {
7272
accessibilityLabel="Remove Image For Tag"
7373
/>
7474
<Button
75-
onPress={() =>
75+
onPress={_ =>
7676
switch (self.state.imageUri) {
7777
| Some(uri) =>
7878
ImageStore.getBase64ForTag(

‎bs-react-native-example/src/pages/PermissionsAndroidExample.re‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module ExampleSingle = {
3636
<View>
3737
<TouchableNativeFeedback
3838
background={TouchableNativeFeedback.selectableBackground()}
39-
onPress=requestPermissions>
39+
onPress={_ => requestPermissions()}>
4040
<View style=Style.(style([backgroundColor(String("#03DAC5"))]))>
4141
<Text
4242
style=Style.(
@@ -81,7 +81,7 @@ module ExampleMultiple = {
8181
<View>
8282
<TouchableNativeFeedback
8383
background={TouchableNativeFeedback.selectableBackground()}
84-
onPress=requestMultiplePermissions>
84+
onPress={_ => requestMultiplePermissions()}>
8585
<View style=Style.(style([backgroundColor(String("#03DAC5"))]))>
8686
<Text
8787
style=Style.(

‎bs-react-native-example/src/pages/SettingsExample.re‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module SetExample = {
4646
onChangeText={text => self.send(SetVersion(text))}
4747
/>
4848
<Button
49-
onPress={() => {
49+
onPress={_ => {
5050
let settings = Js.Dict.empty();
5151
Js.Dict.set(settings, "version_preference", self.state.version);
5252

@@ -70,7 +70,7 @@ let examples: array(Example.t) = [|
7070
description: Some("Get Settings value"),
7171
render: () =>
7272
<Button
73-
onPress={() => {
73+
onPress={_ => {
7474
let version = Settings.get("version_preference");
7575
Alert.alert(~title="version -> " ++ version, ());
7676
}}

‎bs-react-native-next/src/Event.bs.js‎

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bs-react-native-next/src/Event.re‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ module NativeEvent = {
1414
[@bs.get] external data: t => string = "";
1515
};
1616

17+
/*
18+
fixme rename NativeEvent to NativePressEvent when necessary
19+
see https://github.com/facebook/react-native/blob/master/Libraries/Types/CoreEventTypes.js
20+
*/
21+
module NativePressEvent = NativeEvent;
22+
1723
module NativeLayoutEvent = {
1824
type t;
1925
type layout = {

‎bs-react-native-next/src/TouchableHighlight.re‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ external make:
3131
~disabled: bool=?,
3232
~hitSlop: Types.insets=?,
3333
~onLayout: Event.NativeLayoutEvent.t => unit=?,
34-
~onPress: unit => unit=?,
35-
~onPressIn: unit => unit=?,
36-
~onPressOut: unit => unit=?,
34+
~onLongPress: Event.NativePressEvent.t => unit=?,
35+
~onPress: Event.NativePressEvent.t => unit=?,
36+
~onPressIn: Event.NativePressEvent.t => unit=?,
37+
~onPressOut: Event.NativePressEvent.t => unit=?,
3738
~pressRetentionOffset: Types.insets=?,
3839
~activeOpacity: float=?,
3940
~onHideUnderlay: unit => unit=?,

‎bs-react-native-next/src/TouchableNativeFeedback.re‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ external make:
3434
~disabled: bool=?,
3535
~hitSlop: Types.insets=?,
3636
~onLayout: Event.NativeLayoutEvent.t => unit=?,
37-
~onLongPress: unit => unit=?,
38-
~onPress: unit => unit=?,
39-
~onPressIn: unit => unit=?,
40-
~onPressOut: unit => unit=?,
37+
~onLongPress: Event.NativePressEvent.t => unit=?,
38+
~onPress: Event.NativePressEvent.t => unit=?,
39+
~onPressIn: Event.NativePressEvent.t => unit=?,
40+
~onPressOut: Event.NativePressEvent.t => unit=?,
4141
~pressRetentionOffset: Types.insets=?,
4242
~style: Style.t=?,
4343
~background: Background.t=?,

‎bs-react-native-next/src/TouchableOpacity.re‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ external make:
3232
~hitSlop: Types.insets=?,
3333
~style: Style.t=?,
3434
~onLayout: Event.NativeLayoutEvent.t => unit=?,
35-
~onPress: unit => unit=?,
36-
~onLongPress: unit => unit=?,
37-
~onPressIn: unit => unit=?,
38-
~onPressOut: unit => unit=?,
35+
~onLongPress: Event.NativePressEvent.t => unit=?,
36+
~onPress: Event.NativePressEvent.t => unit=?,
37+
~onPressIn: Event.NativePressEvent.t => unit=?,
38+
~onPressOut: Event.NativePressEvent.t => unit=?,
3939
~pressRetentionOffset: Types.insets=?,
4040
~activeOpacity: float=?,
4141
~focusedOpacity: float=?,

‎bs-react-native-next/src/TouchableWithoutFeedback.re‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ external make:
3131
~disabled: bool=?,
3232
~hitSlop: Types.insets=?,
3333
~onLayout: Event.NativeLayoutEvent.t => unit=?,
34-
~onLongPress: unit => unit=?,
35-
~onPress: unit => unit=?,
36-
~onPressIn: unit => unit=?,
37-
~onPressOut: unit => unit=?,
34+
~onLongPress: Event.NativePressEvent.t => unit=?,
35+
~onPress: Event.NativePressEvent.t => unit=?,
36+
~onPressIn: Event.NativePressEvent.t => unit=?,
37+
~onPressOut: Event.NativePressEvent.t => unit=?,
3838
~pressRetentionOffset: Types.insets=?,
3939
~style: Style.t=?,
4040
~testID: string=?,

0 commit comments

Comments
 (0)