@premieroctet/react-native-wallet
Version:
A React-Native wrapper for Apple PassKit and Google Wallet API
30 lines • 1.11 kB
JavaScript
import { requireNativeViewManager } from 'expo-modules-core';
import * as React from 'react';
import { Platform, StyleSheet } from 'react-native';
import { ButtonType } from './RNWallet.types';
import { Constants } from './RNWalletModule';
const NativeView = requireNativeViewManager('RNWallet');
export default function RNWalletView({ onPress, style, buttonType = ButtonType.PRIMARY, ...props }) {
return (React.createElement(NativeView, { onButtonPress: onPress, style: [
styles.button,
Platform.select({
android: {
width: Constants.buttonLayout.baseWidthFromType(buttonType),
},
ios: {},
}),
style,
], buttonType: buttonType, ...props }));
}
const styles = StyleSheet.create({
button: Platform.select({
ios: {
width: Constants.buttonLayout?.baseWidth,
height: Constants.buttonLayout?.baseHeight,
},
android: {
height: Constants.buttonLayout?.baseHeight,
},
}),
});
//# sourceMappingURL=RNWalletView.js.map