Skip to content

Commit 0819adb

Browse files
MoOxcknitt
authored andcommitted
reason-react-native: PickerIOS (#445)
1 parent 0022650 commit 0819adb

3 files changed

Lines changed: 200 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
4+
var Item = /* module */[];
5+
6+
exports.Item = Item;
7+
/* No side effect */
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
id: components/Picker
3+
title: Picker
4+
wip: true
5+
---
6+
7+
```reason
8+
type element;
9+
type ref = React.Ref.t(Js.nullable(element));
10+
11+
[@react.component] [@bs.module "react-native"]
12+
external make:
13+
(
14+
~ref: ref=?,
15+
// Picker props
16+
~onValueChange: ('a, int) => unit=?,
17+
~selectedValue: 'a=?,
18+
~itemStyle: Style.t=?,
19+
// View Props
20+
~accessibilityComponentType: [@bs.string] [
21+
| `none
22+
| `button
23+
| `radiobutton_checked
24+
| `radiobutton_unchecked
25+
]
26+
=?,
27+
~accessibilityElementsHidden: bool=?,
28+
~accessibilityHint: string=?,
29+
~accessibilityIgnoresInvertColors: bool=?,
30+
~accessibilityLabel: string=?,
31+
~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?,
32+
~accessibilityRole: [@bs.string] [
33+
| `none
34+
| `button
35+
| `link
36+
| `search
37+
| `image
38+
| `keyboardkey
39+
| `text
40+
| `adjustable
41+
| `header
42+
| `summary
43+
| `imagebutton
44+
]
45+
=?,
46+
~accessibilityStates: array(AccessibilityState.t)=?,
47+
~accessibilityTraits: array(AccessibilityTrait.t)=?,
48+
~accessibilityViewIsModal: bool=?,
49+
~accessible: bool=?,
50+
~collapsable: bool=?,
51+
~hitSlop: Types.edgeInsets=?,
52+
~importantForAccessibility: [@bs.string] [
53+
| `auto
54+
| `yes
55+
| `no
56+
| [@bs.as "no-hide-descendants"]
57+
`noHideDescendants
58+
]
59+
=?,
60+
~nativeID: string=?,
61+
~needsOffscreenAlphaCompositing: bool=?,
62+
~onAccessibilityTap: unit => unit=?,
63+
~onLayout: Event.layoutEvent => unit=?,
64+
~onMagicTap: unit => unit=?,
65+
// Gesture Responder props
66+
~onMoveShouldSetResponder: Event.pressEvent => bool=?,
67+
~onMoveShouldSetResponderCapture: Event.pressEvent => bool=?,
68+
~onResponderGrant: Event.pressEvent => unit=?,
69+
~onResponderMove: Event.pressEvent => unit=?,
70+
~onResponderReject: Event.pressEvent => unit=?,
71+
~onResponderRelease: Event.pressEvent => unit=?,
72+
~onResponderTerminate: Event.pressEvent => unit=?,
73+
~onResponderTerminationRequest: Event.pressEvent => unit=?,
74+
~onStartShouldSetResponder: Event.pressEvent => bool=?,
75+
~onStartShouldSetResponderCapture: Event.pressEvent => bool=?,
76+
~pointerEvents: [@bs.string] [
77+
| `auto
78+
| `none
79+
| [@bs.as "box-none"] `boxNone
80+
| [@bs.as "box-only"] `boxOnly
81+
]
82+
=?,
83+
~removeClippedSubviews: bool=?,
84+
~renderToHardwareTextureAndroid: bool=?,
85+
~shouldRasterizeIOS: bool=?,
86+
~style: Style.t=?,
87+
~testID: string=?,
88+
~children: React.element=?
89+
) =>
90+
React.element =
91+
"PickerIOS";
92+
93+
module Item = {
94+
[@react.component] [@bs.module "react-native"] [@bs.scope "PickerIOS"]
95+
external make:
96+
(~value: 'a=?, ~label: string, ~color: Style.color=?, ~testID: string=?) =>
97+
React.element =
98+
"Item";
99+
};
100+
101+
```
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
type element;
2+
type ref = React.Ref.t(Js.nullable(element));
3+
4+
[@react.component] [@bs.module "react-native"]
5+
external make:
6+
(
7+
~ref: ref=?,
8+
// Picker props
9+
~onValueChange: ('a, int) => unit=?,
10+
~selectedValue: 'a=?,
11+
~itemStyle: Style.t=?,
12+
// View Props
13+
~accessibilityComponentType: [@bs.string] [
14+
| `none
15+
| `button
16+
| `radiobutton_checked
17+
| `radiobutton_unchecked
18+
]
19+
=?,
20+
~accessibilityElementsHidden: bool=?,
21+
~accessibilityHint: string=?,
22+
~accessibilityIgnoresInvertColors: bool=?,
23+
~accessibilityLabel: string=?,
24+
~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?,
25+
~accessibilityRole: [@bs.string] [
26+
| `none
27+
| `button
28+
| `link
29+
| `search
30+
| `image
31+
| `keyboardkey
32+
| `text
33+
| `adjustable
34+
| `header
35+
| `summary
36+
| `imagebutton
37+
]
38+
=?,
39+
~accessibilityStates: array(AccessibilityState.t)=?,
40+
~accessibilityTraits: array(AccessibilityTrait.t)=?,
41+
~accessibilityViewIsModal: bool=?,
42+
~accessible: bool=?,
43+
~collapsable: bool=?,
44+
~hitSlop: Types.edgeInsets=?,
45+
~importantForAccessibility: [@bs.string] [
46+
| `auto
47+
| `yes
48+
| `no
49+
| [@bs.as "no-hide-descendants"]
50+
`noHideDescendants
51+
]
52+
=?,
53+
~nativeID: string=?,
54+
~needsOffscreenAlphaCompositing: bool=?,
55+
~onAccessibilityTap: unit => unit=?,
56+
~onLayout: Event.layoutEvent => unit=?,
57+
~onMagicTap: unit => unit=?,
58+
// Gesture Responder props
59+
~onMoveShouldSetResponder: Event.pressEvent => bool=?,
60+
~onMoveShouldSetResponderCapture: Event.pressEvent => bool=?,
61+
~onResponderGrant: Event.pressEvent => unit=?,
62+
~onResponderMove: Event.pressEvent => unit=?,
63+
~onResponderReject: Event.pressEvent => unit=?,
64+
~onResponderRelease: Event.pressEvent => unit=?,
65+
~onResponderTerminate: Event.pressEvent => unit=?,
66+
~onResponderTerminationRequest: Event.pressEvent => unit=?,
67+
~onStartShouldSetResponder: Event.pressEvent => bool=?,
68+
~onStartShouldSetResponderCapture: Event.pressEvent => bool=?,
69+
~pointerEvents: [@bs.string] [
70+
| `auto
71+
| `none
72+
| [@bs.as "box-none"] `boxNone
73+
| [@bs.as "box-only"] `boxOnly
74+
]
75+
=?,
76+
~removeClippedSubviews: bool=?,
77+
~renderToHardwareTextureAndroid: bool=?,
78+
~shouldRasterizeIOS: bool=?,
79+
~style: Style.t=?,
80+
~testID: string=?,
81+
~children: React.element=?
82+
) =>
83+
React.element =
84+
"PickerIOS";
85+
86+
module Item = {
87+
[@react.component] [@bs.module "react-native"] [@bs.scope "PickerIOS"]
88+
external make:
89+
(~value: 'a=?, ~label: string, ~color: Style.color=?, ~testID: string=?) =>
90+
React.element =
91+
"Item";
92+
};

0 commit comments

Comments
 (0)