react-native-paypal-buttons
Version:
React native implementation of PayPal Buttons
32 lines (31 loc) • 909 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLabelMode = exports.getLabelColor = void 0;
var _types = require("./types");
const getLabelColor = background => {
switch (background) {
case _types.PaymentButtonColor.GOLD:
case _types.PaymentButtonColor.WHITE:
case _types.PaymentButtonColor.SILVER:
return 'black';
default:
return 'white';
}
};
exports.getLabelColor = getLabelColor;
const getLabelMode = (label, size) => {
if (label === _types.PaymentButtonLabel.PAY_LATER) {
return 'suffix';
}
if (label === _types.PaymentButtonLabel.NONE || [_types.PaymentButtonSize.MINI, _types.PaymentButtonSize.COLLAPSED].includes(size)) {
return 'none';
}
if (label === _types.PaymentButtonLabel.PAY_WITH) {
return 'prefix';
}
return 'suffix';
};
exports.getLabelMode = getLabelMode;
//# sourceMappingURL=label.js.map