UNPKG

@premieroctet/react-native-wallet

Version:

A React-Native wrapper for Apple PassKit and Google Wallet API

22 lines 914 B
import { requireNativeModule } from 'expo-modules-core'; import { Platform } from 'react-native'; import { ButtonType } from './RNWallet.types'; // It loads the native module object from the JSI or falls back to // the bridge module (from NativeModulesProxy) if the remote debugger is on. const RNWalletModule = requireNativeModule('RNWallet'); export const Constants = { buttonLayout: { baseWidth: RNWalletModule.buttonLayout?.baseWidth, baseHeight: RNWalletModule.buttonLayout?.baseHeight, baseWidthFromType(type) { if (Platform.OS === 'android') { if (type === ButtonType.PRIMARY) { return RNWalletModule.buttonLayout?.baseWidthPrimary; } return RNWalletModule.buttonLayout?.baseWidthCondensed; } }, }, }; export default RNWalletModule; //# sourceMappingURL=RNWalletModule.js.map