-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathShare.res
More file actions
47 lines (38 loc) · 1.22 KB
/
Share.res
File metadata and controls
47 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
type content = {
title?: string,
message?: string,
url?: string,
}
@obj // @deprecated("Directly create record instead")
external content: (~title: string=?, ~message: string=?, ~url: string=?, unit) => content = ""
type options = {
subject?: string,
tintColor?: string,
excludedActivityTypes?: array<string>,
dialogTitle?: string,
}
@obj // @deprecated("Directly create record instead")
external options: (
~subject: string=?,
~tintColor: string=?,
~excludedActivityTypes: array<string>=?,
~dialogTitle: string=?,
unit,
) => options = ""
type action
@module("react-native") @scope("Share")
external sharedAction: action = "sharedAction"
@module("react-native") @scope("Share")
external dismissedAction: action = "dismissedAction"
// This is usually only used as a callback param and not created by the user.
// Therefore prefer option<...> to an optional field for easier matching.
type shareResult = {
action: action,
activityType: option<string>,
}
// multiple externals
@module("react-native") @scope("Share")
external share: content => Js.Promise.t<shareResult> = "share"
// multiple externals
@module("react-native") @scope("Share")
external shareWithOptions: (content, options) => Js.Promise.t<bool> = "share"