@akinon/pz-apple-pay 2.0.0-beta.10 → 2.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @akinon/pz-apple-pay
2
2
 
3
+ ## 2.0.0-beta.11
4
+
5
+ ### Minor Changes
6
+
7
+ - ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
8
+
3
9
  ## 2.0.0-beta.10
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-apple-pay",
3
- "version": "2.0.0-beta.10",
3
+ "version": "2.0.0-beta.11",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
@@ -3,8 +3,16 @@
3
3
  import { useAppSelector } from '@akinon/next/redux/hooks';
4
4
  import { RootState } from '@theme/redux/store';
5
5
  import useApplePay from '../hooks/use-apple-pay';
6
+ import { JSX } from 'react';
6
7
 
7
- export default function ApplePay() {
8
+ export interface ApplePayProps {
9
+ customUIRender?: (props: {
10
+ initPaymentRequest?: () => void;
11
+ paymentErrors?: string | null;
12
+ }) => JSX.Element | null;
13
+ }
14
+
15
+ export default function ApplePay({ customUIRender }: ApplePayProps) {
8
16
  const { walletPaymentData } = useAppSelector(
9
17
  (state: RootState) => state.checkout
10
18
  );
@@ -14,6 +22,13 @@ export default function ApplePay() {
14
22
  return null;
15
23
  }
16
24
 
25
+ if (customUIRender) {
26
+ return customUIRender({
27
+ initPaymentRequest,
28
+ paymentErrors
29
+ });
30
+ }
31
+
17
32
  return (
18
33
  <div>
19
34
  <button onClick={initPaymentRequest}>Pay with Apple Pay</button>