@@ -45,7 +45,7 @@ yarn add @reason-react-native/inappbrowser
45
45
open Js.Promise;
46
46
47
47
let opts = iosOptions(~preferredBarTintColor="#ff0000", ());
48
- openBrowserIos ("https://rescript-lang.org", opts)
48
+ openBrowser ("https://rescript-lang.org", `IosOptions( opts) )
49
49
|> Js.Promise.then_((result: browserResult) => {
50
50
Js.log(result.resultType);
51
51
resolve();
@@ -56,7 +56,7 @@ openBrowserIos("https://rescript-lang.org", opts)
56
56
``` reason
57
57
open Js.Promise;
58
58
59
- openAuthIos("https://example.com/auth", "myschema://auth", iosOptions())
59
+ openAuthIos("https://example.com/auth", "myschema://auth", `IosOptions( iosOptions() ))
60
60
|> Js.Promise.then_((result: authResult) => {
61
61
switch (result.url) {
62
62
| Some(url) => Js.log(url)
@@ -70,23 +70,19 @@ openAuthIos("https://example.com/auth", "myschema://auth", iosOptions())
70
70
### Types
71
71
72
72
#### ` authResult `
73
+
73
74
#### ` browserResult `
75
+
74
76
#### ` iosOptions `
75
- #### ` androidOptions `
76
77
78
+ #### ` androidOptions `
77
79
78
80
### Methods
79
81
80
- #### ` ReactNativeInAppBrowser.openBrowserIos `
81
-
82
- ``` reason
83
- (string, iosOptions) => Js.Promise.t(browserResult)
84
- ```
85
-
86
- #### ` ReactNativeInAppBrowser.openBrowserAndroid `
82
+ #### ` ReactNativeInAppBrowser.openBrowser `
87
83
88
84
``` reason
89
- (string, androidOptions) => Js.Promise.t(browserResult)
85
+ (string, [ `AndroidOptions( androidOptions) | `IosOptions(iosOptions) ]) => Js.Promise.t(browserResult)
90
86
```
91
87
92
88
#### ` ReactNativeInAppBrowser.close `
@@ -95,16 +91,10 @@ openAuthIos("https://example.com/auth", "myschema://auth", iosOptions())
95
91
unit => unit
96
92
```
97
93
98
- #### ` ReactNativeInAppBrowser.openAuthIos `
99
-
100
- ``` reason
101
- (string, iosOptions) => Js.Promise.t(authResult)
102
- ```
103
-
104
- #### ` ReactNativeInAppBrowser.openAuthAndroid `
94
+ #### ` ReactNativeInAppBrowser.openAuth `
105
95
106
96
``` reason
107
- (string, androidOptions) => Js.Promise.t(authResult)
97
+ (string, [ `AndroidOptions( androidOptions) | `IosOptions(iosOptions) ]) => Js.Promise.t(authResult)
108
98
```
109
99
110
100
#### ` ReactNativeInAppBrowser.closeAuth `
0 commit comments