react-native-paypal-buttons
Version:
React native implementation of PayPal Buttons
26 lines (25 loc) • 723 B
JavaScript
;
import { PaymentButtonColor, PaymentButtonSize, PaymentButtonLabel } from './types';
export const getLabelColor = background => {
switch (background) {
case PaymentButtonColor.GOLD:
case PaymentButtonColor.WHITE:
case PaymentButtonColor.SILVER:
return 'black';
default:
return 'white';
}
};
export const getLabelMode = (label, size) => {
if (label === PaymentButtonLabel.PAY_LATER) {
return 'suffix';
}
if (label === PaymentButtonLabel.NONE || [PaymentButtonSize.MINI, PaymentButtonSize.COLLAPSED].includes(size)) {
return 'none';
}
if (label === PaymentButtonLabel.PAY_WITH) {
return 'prefix';
}
return 'suffix';
};
//# sourceMappingURL=label.js.map