Skip to content

Commit

Permalink
Merge pull request #73 from mediaopt/feature/36076-apple-pay
Browse files Browse the repository at this point in the history
#36076 added a button as wrapper to apple-pay-button to simulate oncl…
  • Loading branch information
majidabbasimediaopt authored Apr 16, 2024
2 parents 2680982 + 570c3c4 commit 17317a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paypal-commercetools-client",
"version": "0.0.99-alpha",
"version": "0.1.01-alpha",
"private": false,
"type": "module",
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions src/components/ApplePay/ApplePayMask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ declare global {
buttonstyle: string;
type: string;
locale: string;
onclick: () => void;
};
}
}
Expand Down Expand Up @@ -57,19 +56,22 @@ export const ApplePayMask: React.FC<CustomPayPalButtonsComponentProps> = (
);
}, [props]);

const onApplePayButtonClicked = () => {
console.log("Apple Pay button clicked");
};

return (
<>
<div id="applepay-container">
{isEligible ? (
<>
<button className="bg-none" onClick={onApplePayButtonClicked}>
<apple-pay-button
id="btn-appl"
buttonstyle="black"
type="buy"
locale="en"
onclick={() => console.log("Apple Pay button clicked")}
></apple-pay-button>
</>
</button>
) : (
<>{error}</>
)}
Expand Down

0 comments on commit 17317a8

Please sign in to comment.