Skip to content

Commit 936a8e3

Browse files
committed
wip docs for components & apis
1 parent 29e7e98 commit 936a8e3

50 files changed

Lines changed: 4293 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
id: apis/ActionSheetIOS
3+
title: ActionSheetIOS
4+
wip: true
5+
---
6+
7+
```reason
8+
type options;
9+
[@bs.obj]
10+
external options:
11+
(
12+
~options: array(string),
13+
~cancelButtonIndex: int=?,
14+
~destructiveButtonIndex: int=?,
15+
~title: string=?,
16+
~message: string=?,
17+
~tintColor: Style.color=?,
18+
unit
19+
) =>
20+
options =
21+
"";
22+
23+
[@bs.module "react-native"] [@bs.scope "ActionSheetIOS"]
24+
external showActionSheetWithOptions: (options, int => unit) => unit =
25+
"showActionSheetWithOptions";
26+
27+
type shareOptions;
28+
[@bs.obj]
29+
external shareOptions:
30+
(
31+
~url: string=?,
32+
~message: string=?,
33+
~subject: string=?,
34+
~excludedActivityTypes: array(string)=?,
35+
unit
36+
) =>
37+
shareOptions =
38+
"";
39+
40+
type error = {. "stack": option(string)};
41+
42+
[@bs.module "react-native"] [@bs.scope "ActionSheetIOS"]
43+
external showShareActionSheetWithOptions:
44+
(shareOptions, error => unit, (bool, string) => unit) => unit =
45+
"showShareActionSheetWithOptions";
46+
47+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
id: apis/Alert
3+
title: Alert
4+
wip: true
5+
---
6+
7+
```reason
8+
type options;
9+
10+
[@bs.obj]
11+
external options:
12+
(~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => options =
13+
"";
14+
15+
type button;
16+
17+
[@bs.obj]
18+
external button:
19+
(
20+
~text: string=?,
21+
~onPress: unit => unit=?,
22+
~style: [@bs.string] [ | `default | `cancel | `destructive]=?,
23+
unit
24+
) =>
25+
button =
26+
"";
27+
28+
[@bs.scope "Alert"] [@bs.module "react-native"]
29+
external alert:
30+
(
31+
~title: string,
32+
~message: string=?,
33+
~buttons: array(button)=?,
34+
~options: options=?,
35+
~type_: [@bs.string] [
36+
| `default
37+
| `plainText
38+
| `secureText
39+
| `loginPassword
40+
]
41+
=?,
42+
unit
43+
) =>
44+
unit =
45+
"alert";
46+
47+
```
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
id: apis/AlertIOS
3+
title: AlertIOS
4+
wip: true
5+
---
6+
7+
```reason
8+
type button;
9+
[@bs.obj]
10+
external button:
11+
(
12+
~text: string=?,
13+
~onPress: option(string) => unit=?,
14+
~style: [@bs.string] [ | `default | `cancel | `destructive]=?,
15+
unit
16+
) =>
17+
button =
18+
"";
19+
20+
[@bs.scope "AlertIOS"] [@bs.module "react-native"]
21+
external alert:
22+
(~title: string, ~message: string=?, ~buttons: array(button)=?, unit) =>
23+
unit =
24+
"alert";
25+
26+
[@bs.scope "AlertIOS"] [@bs.module "react-native"]
27+
external alertWithOKButton:
28+
(~title: string, ~message: string=?, ~callback: unit => unit=?, unit) => unit =
29+
"alert";
30+
31+
[@bs.scope "AlertIOS"] [@bs.module "react-native"]
32+
external prompt:
33+
(
34+
~title: string,
35+
~message: string=?,
36+
~buttons: array(button)=?,
37+
~_type: [@bs.string] [
38+
| `default
39+
| [@bs.as "plain-text"] `plainText
40+
| [@bs.as "secure-text"] `secureText
41+
| [@bs.as "login-password"] `loginPassword
42+
]
43+
=?,
44+
~defaultValue: string=?,
45+
~keyboardType: [@bs.string] [
46+
| `default
47+
| [@bs.as "number-pad"] `numberPad
48+
| [@bs.as "decimal-pad"] `decimalPad
49+
| `numeric
50+
| [@bs.as "email-address"] `emailAddress
51+
| [@bs.as "phone-pad"] `phonePad
52+
| [@bs.as "ascii-capable"] `asciiCapable
53+
| [@bs.as "numbers-and-punctuation"]
54+
`numbersAndPunctuation
55+
| `url
56+
| [@bs.as "name-phone-pad"] `namePhonePad
57+
| `twitter
58+
| [@bs.as "web-search"] `webSearch
59+
| [@bs.as "visible-password"] `visiblePassword
60+
]
61+
=?,
62+
unit
63+
) =>
64+
unit =
65+
"prompt";
66+
67+
[@bs.scope "AlertIOS"] [@bs.module "react-native"]
68+
external promptWithOKButton:
69+
(
70+
~title: string,
71+
~message: string=?,
72+
~callback: string => unit=?,
73+
~_type: [@bs.string] [
74+
| `default
75+
| [@bs.as "plain-text"] `plainText
76+
| [@bs.as "secure-text"] `secureText
77+
| [@bs.as "login-password"] `loginPassword
78+
]
79+
=?,
80+
~defaultValue: string=?,
81+
~keyboardType: [@bs.string] [
82+
| `default
83+
| [@bs.as "number-pad"] `numberPad
84+
| [@bs.as "decimal-pad"] `decimalPad
85+
| `numeric
86+
| [@bs.as "email-address"] `emailAddress
87+
| [@bs.as "phone-pad"] `phonePad
88+
| [@bs.as "ascii-capable"] `asciiCapable
89+
| [@bs.as "numbers-and-punctuation"]
90+
`numbersAndPunctuation
91+
| `url
92+
| [@bs.as "name-phone-pad"] `namePhonePad
93+
| `twitter
94+
| [@bs.as "web-search"] `webSearch
95+
| [@bs.as "visible-password"] `visiblePassword
96+
]
97+
=?,
98+
unit
99+
) =>
100+
unit =
101+
"prompt";
102+
103+
```

0 commit comments

Comments
 (0)