0.1.3 • Published 2 years ago
rn-google-pay-button-only v0.1.3
rn-google-pay-button-only
Installation
npm install rn-google-pay-button-onlyDemo
import GooglePayImage from 'rn-google-pay-button-only';
// wrap with
<TouchableOpacity
style={styles.container}
onPress={() => console.log('Pressed')}
>
<GooglePayImage type="PAY_WITH" style={styles.box} />
</TouchableOpacity>;
const styles = StyleSheet.create({
box: {
width: 228,
height: 60,
},
});Props
type RnGooglePayButtonOnlyProps = {
type: payButtonType,
style: ViewStyle,
};| payButtonType |
|---|
| PAY_WITH |
| SHADOW_PAY_WITH |
| BUY_WITH |
| SHADOW_BUY_WITH |
| GOOGLE_PAY |
| SHADOW_GOOGLE_PAY |
| GOOGLE_PAY_PLAIN_DARK |
Caution ⚠️
- This is a button only component and does not contain any logic to handle payment process.
- Android only
Resources
We obtained the assets from the Google Pay brand's static resources.Refer to the website link for further details.
https://developers.google.com/pay/api/android/guides/resources/payment-button-static-assets
License
MIT
Made with create-react-native-library