UNPKG

@palta-brain/web-sdk

Version:
45 lines 1.87 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var react_1 = __importDefault(require("react")); var ApplePayButton = function (_a) { var _b = _a.styleType, styleType = _b === void 0 ? 'black' : _b; var classNames = "apple-pay-button apple-pay-button-".concat(styleType); var baseStyle = { width: '100%', height: '50px', WebkitAppearance: '-apple-pay-button', applePayButtonType: 'buy', // This line is illustrative; it may not be directly applicable type: 'buy', display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', marginBottom: '10px', }; var styles = { black: __assign(__assign({}, baseStyle), { applePayButtonStyle: 'black' }), white: __assign(__assign({}, baseStyle), { applePayButtonStyle: 'white' }), whiteOutline: __assign(__assign({}, baseStyle), { applePayButtonStyle: 'white-outline' }), }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore var selectedStyle = styles[styleType] || styles.black; return react_1.default.createElement("button", { className: classNames, style: selectedStyle }); }; exports.default = ApplePayButton; //# sourceMappingURL=ApplePayButton.js.map