Skip to content

Commit d3a65e1

Browse files
sgnyMoOx
authored andcommitted
Zero-cost bindings to ToolbarAndroid (#423)
1 parent 84ccdf3 commit d3a65e1

3 files changed

Lines changed: 222 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
id: components/ToolbarAndroid
3+
title: ToolbarAndroid
4+
wip: true
5+
---
6+
7+
```reason
8+
type element;
9+
type ref = React.Ref.t(Js.nullable(element));
10+
11+
type action;
12+
[@bs.obj]
13+
external action:
14+
(
15+
~title: string,
16+
~icon: Image.Source.t=?,
17+
~show: [@bs.string] [ | `always | `ifRoom | `never]=?,
18+
~showWithText: bool=?,
19+
unit
20+
) =>
21+
action =
22+
"";
23+
24+
[@react.component] [@bs.module "react-native"]
25+
external make:
26+
(
27+
~ref: ref=?,
28+
~overflowIcon: Image.Source.t=?,
29+
~actions: array(action)=?,
30+
~contentInsetStart: float=?,
31+
~logo: Image.Source.t=?,
32+
~navIcon: Image.Source.t=?,
33+
~onActionSelected: int => unit=?,
34+
~onIconClicked: unit => unit=?,
35+
~contentInsetEnd: float=?,
36+
~rtl: bool=?,
37+
~subtitle: string=?,
38+
~subtitleColor: Style.color=?,
39+
~title: string=?,
40+
~titleColor: Style.color=?,
41+
// View props
42+
~accessibilityComponentType: [@bs.string] [
43+
| `none
44+
| `button
45+
| `radiobutton_checked
46+
| `radiobutton_unchecked
47+
]
48+
=?,
49+
~accessibilityElementsHidden: bool=?,
50+
~accessibilityHint: string=?,
51+
~accessibilityIgnoresInvertColors: bool=?,
52+
~accessibilityLabel: string=?,
53+
~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?,
54+
~accessibilityRole: [@bs.string] [
55+
| `none
56+
| `button
57+
| `link
58+
| `search
59+
| `image
60+
| `keyboardkey
61+
| `text
62+
| `adjustable
63+
| `header
64+
| `summary
65+
| `imagebutton
66+
]
67+
=?,
68+
~accessibilityStates: array(AccessibilityState.t)=?,
69+
~accessibilityTraits: array(AccessibilityTrait.t)=?,
70+
~accessibilityViewIsModal: bool=?,
71+
~accessible: bool=?,
72+
~collapsable: bool=?,
73+
~hitSlop: Types.insets=?,
74+
~importantForAccessibility: [@bs.string] [
75+
| `auto
76+
| `yes
77+
| `no
78+
| [@bs.as "no-hide-descendants"]
79+
`noHideDescendants
80+
]
81+
=?,
82+
~nativeID: string=?,
83+
~needsOffscreenAlphaCompositing: bool=?,
84+
~onAccessibilityTap: unit => unit=?,
85+
~onLayout: Event.layoutEvent => unit=?,
86+
~onMagicTap: unit => unit=?,
87+
// Gesture Responder props
88+
~onMoveShouldSetResponder: Event.pressEvent => bool=?,
89+
~onMoveShouldSetResponderCapture: Event.pressEvent => bool=?,
90+
~onResponderGrant: Event.pressEvent => unit=?,
91+
~onResponderMove: Event.pressEvent => unit=?,
92+
~onResponderReject: Event.pressEvent => unit=?,
93+
~onResponderRelease: Event.pressEvent => unit=?,
94+
~onResponderTerminate: Event.pressEvent => unit=?,
95+
~onResponderTerminationRequest: Event.pressEvent => unit=?,
96+
~onStartShouldSetResponder: Event.pressEvent => bool=?,
97+
~onStartShouldSetResponderCapture: Event.pressEvent => bool=?,
98+
~pointerEvents: [@bs.string] [
99+
| `auto
100+
| `none
101+
| [@bs.as "box-none"] `boxNone
102+
| [@bs.as "box-only"] `boxOnly
103+
]
104+
=?,
105+
~removeClippedSubviews: bool=?,
106+
~renderToHardwareTextureAndroid: bool=?,
107+
~shouldRasterizeIOS: bool=?,
108+
~style: Style.t=?,
109+
~testID: string=?,
110+
~children: React.element=?
111+
) =>
112+
React.element =
113+
"ToolbarAndroid";
114+
115+
```
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
type element;
2+
type ref = React.Ref.t(Js.nullable(element));
3+
4+
type action;
5+
[@bs.obj]
6+
external action:
7+
(
8+
~title: string,
9+
~icon: Image.Source.t=?,
10+
~show: [@bs.string] [ | `always | `ifRoom | `never]=?,
11+
~showWithText: bool=?,
12+
unit
13+
) =>
14+
action =
15+
"";
16+
17+
[@react.component] [@bs.module "react-native"]
18+
external make:
19+
(
20+
~ref: ref=?,
21+
~overflowIcon: Image.Source.t=?,
22+
~actions: array(action)=?,
23+
~contentInsetStart: float=?,
24+
~logo: Image.Source.t=?,
25+
~navIcon: Image.Source.t=?,
26+
~onActionSelected: int => unit=?,
27+
~onIconClicked: unit => unit=?,
28+
~contentInsetEnd: float=?,
29+
~rtl: bool=?,
30+
~subtitle: string=?,
31+
~subtitleColor: Style.color=?,
32+
~title: string=?,
33+
~titleColor: Style.color=?,
34+
// View props
35+
~accessibilityComponentType: [@bs.string] [
36+
| `none
37+
| `button
38+
| `radiobutton_checked
39+
| `radiobutton_unchecked
40+
]
41+
=?,
42+
~accessibilityElementsHidden: bool=?,
43+
~accessibilityHint: string=?,
44+
~accessibilityIgnoresInvertColors: bool=?,
45+
~accessibilityLabel: string=?,
46+
~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?,
47+
~accessibilityRole: [@bs.string] [
48+
| `none
49+
| `button
50+
| `link
51+
| `search
52+
| `image
53+
| `keyboardkey
54+
| `text
55+
| `adjustable
56+
| `header
57+
| `summary
58+
| `imagebutton
59+
]
60+
=?,
61+
~accessibilityStates: array(AccessibilityState.t)=?,
62+
~accessibilityTraits: array(AccessibilityTrait.t)=?,
63+
~accessibilityViewIsModal: bool=?,
64+
~accessible: bool=?,
65+
~collapsable: bool=?,
66+
~hitSlop: Types.insets=?,
67+
~importantForAccessibility: [@bs.string] [
68+
| `auto
69+
| `yes
70+
| `no
71+
| [@bs.as "no-hide-descendants"]
72+
`noHideDescendants
73+
]
74+
=?,
75+
~nativeID: string=?,
76+
~needsOffscreenAlphaCompositing: bool=?,
77+
~onAccessibilityTap: unit => unit=?,
78+
~onLayout: Event.layoutEvent => unit=?,
79+
~onMagicTap: unit => unit=?,
80+
// Gesture Responder props
81+
~onMoveShouldSetResponder: Event.pressEvent => bool=?,
82+
~onMoveShouldSetResponderCapture: Event.pressEvent => bool=?,
83+
~onResponderGrant: Event.pressEvent => unit=?,
84+
~onResponderMove: Event.pressEvent => unit=?,
85+
~onResponderReject: Event.pressEvent => unit=?,
86+
~onResponderRelease: Event.pressEvent => unit=?,
87+
~onResponderTerminate: Event.pressEvent => unit=?,
88+
~onResponderTerminationRequest: Event.pressEvent => unit=?,
89+
~onStartShouldSetResponder: Event.pressEvent => bool=?,
90+
~onStartShouldSetResponderCapture: Event.pressEvent => bool=?,
91+
~pointerEvents: [@bs.string] [
92+
| `auto
93+
| `none
94+
| [@bs.as "box-none"] `boxNone
95+
| [@bs.as "box-only"] `boxOnly
96+
]
97+
=?,
98+
~removeClippedSubviews: bool=?,
99+
~renderToHardwareTextureAndroid: bool=?,
100+
~shouldRasterizeIOS: bool=?,
101+
~style: Style.t=?,
102+
~testID: string=?,
103+
~children: React.element=?
104+
) =>
105+
React.element =
106+
"ToolbarAndroid";

0 commit comments

Comments
 (0)