-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (27 loc) · 892 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
26
27
28
29
30
31
32
33
import { NativeModules, processColor } from "react-native";
const { ButtonSdk } = NativeModules;
const { version } = require("./package.json");
export const VERSION = version;
export function setIdentifier(id) {
ButtonSdk.setIdentifier(id);
}
export function clearAllData() {
ButtonSdk.clearAllData();
}
export function startPurchasePath(options) {
ButtonSdk.startPurchasePath({
...options,
headerTitleColor: processColor(options.headerTitleColor),
headerSubtitleColor: processColor(options.headerSubtitleColor),
headerBackgroundColor: processColor(options.headerBackgroundColor),
headerTintColor: processColor(options.headerTintColor),
footerBackgroundColor: processColor(options.footerBackgroundColor),
footerTintColor: processColor(options.footerTintColor)
});
}
export default {
VERSION,
setIdentifier,
clearAllData,
startPurchasePath
};