UNPKG

@palta-brain/web-sdk

Version:
40 lines 1.61 kB
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); }; import React from '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.createElement("button", { className: classNames, style: selectedStyle }); }; export default ApplePayButton; //# sourceMappingURL=ApplePayButton.js.map