forked from dongxiaoyong009/react-native-ding-talk-share
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
26 lines (18 loc) · 738 Bytes
/
index.js
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
import { NativeModules } from 'react-native';
const { RNDingTalkShareModule } = NativeModules;
export default RNDingTalkShareModule;
export function isSupported() {
return RNDingTalkShareModule && RNDingTalkShareModule.isSupported();
}
export function isInstalled() {
return RNDingTalkShareModule && RNDingTalkShareModule.isInstalled();
}
export function shareWebPage(url, thumbImage, title, content) {
return RNDingTalkShareModule && RNDingTalkShareModule.shareWebPage(url, thumbImage, title, content);
}
export function shareImage(image) {
return RNDingTalkShareModule && RNDingTalkShareModule.shareImage(image);
}
export function getAuthCode() {
return RNDingTalkShareModule && RNDingTalkShareModule.getAuthCode();
}