Skip to content

Commit cc87f4b

Browse files
sgnycknitt
authored andcommitted
Correct type for Button onPress callback, add nextFocus* props (#466)
1 parent 631f576 commit cc87f4b

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎reason-react-native/src/components/Button.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ wip: true
55
---
66

77
```reason
8-
type element;
9-
type ref = React.Ref.t(Js.nullable(element));
8+
include NativeElement;
109
1110
[@react.component] [@bs.module "react-native"]
1211
external make:
@@ -17,7 +16,12 @@ external make:
1716
~color: Color.t=?,
1817
~disabled: bool=?,
1918
~hasTVPreferredFocus: bool=?,
20-
~onPress: unit => unit,
19+
~nextFocusDown: int=?,
20+
~nextFocusForward: int=?,
21+
~nextFocusLeft: int=?,
22+
~nextFocusRight: int=?,
23+
~nextFocusUp: int=?,
24+
~onPress: Event.pressEvent => unit,
2125
~testID: string=?,
2226
~title: string
2327
) =>

‎reason-react-native/src/components/Button.re‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ external make:
99
~color: Color.t=?,
1010
~disabled: bool=?,
1111
~hasTVPreferredFocus: bool=?,
12-
~onPress: unit => unit,
12+
~nextFocusDown: int=?,
13+
~nextFocusForward: int=?,
14+
~nextFocusLeft: int=?,
15+
~nextFocusRight: int=?,
16+
~nextFocusUp: int=?,
17+
~onPress: Event.pressEvent => unit,
1318
~testID: string=?,
1419
~title: string
1520
) =>

0 commit comments

Comments
 (0)