@bounceapp/react-native-paypal
Version:
React Native wrapper to bridge PayPal iOS and Android SDK
46 lines (45 loc) • 1.85 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _PaypalLogo = _interopRequireDefault(require("./PaypalLogo"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const PaypalButton = ({
style,
disabled = false,
onPress
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
onPress: onPress,
disabled: disabled,
accessibilityRole: "button",
style: ({
pressed
}) => [styles.idle, pressed && styles.pressed, disabled && styles.disabled, style],
children: !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PaypalLogo.default, {
height: 22,
width: 69
})
});
const styles = _reactNative.StyleSheet.create({
idle: {
height: 48,
width: "100%",
justifyContent: "center",
alignItems: "center",
backgroundColor: "#FFC439",
borderRadius: 6
},
pressed: {
backgroundColor: "#F2BA37"
},
disabled: {
backgroundColor: "#E5E7EB"
}
});
var _default = exports.default = PaypalButton;
//# sourceMappingURL=PaypalButton.js.map