@akinon/pz-apple-pay 1.89.0-rc.2 → 1.89.0-rc.20

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,55 @@
1
1
  # @akinon/pz-apple-pay
2
2
 
3
+ ## 1.89.0-rc.20
4
+
5
+ ## 1.89.0-rc.19
6
+
7
+ ## 1.89.0-rc.18
8
+
9
+ ## 1.89.0-rc.17
10
+
11
+ ## 1.89.0-rc.16
12
+
13
+ ## 1.89.0-rc.15
14
+
15
+ ## 1.89.0-rc.14
16
+
17
+ ### Minor Changes
18
+
19
+ - f2e9d1d: ZERO-3383: Add custom UI rendering option for apple pay
20
+
21
+ ## 1.89.0-rc.13
22
+
23
+ ## 1.89.0-rc.12
24
+
25
+ ## 1.89.0-rc.11
26
+
27
+ ## 1.89.0-rc.10
28
+
29
+ ### Minor Changes
30
+
31
+ - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
32
+ - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
33
+
34
+ ## 1.89.0-rc.9
35
+
36
+ ### Minor Changes
37
+
38
+ - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
39
+ - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
40
+
41
+ ## 1.89.0-rc.8
42
+
43
+ ## 1.89.0-rc.7
44
+
45
+ ## 1.89.0-rc.6
46
+
47
+ ## 1.89.0-rc.5
48
+
49
+ ## 1.89.0-rc.4
50
+
51
+ ## 1.89.0-rc.3
52
+
3
53
  ## 1.89.0-rc.2
4
54
 
5
55
  ## 1.89.0-rc.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-apple-pay",
3
- "version": "1.89.0-rc.2",
3
+ "version": "1.89.0-rc.20",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
@@ -4,7 +4,14 @@ 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
6
 
7
- export default function ApplePay() {
7
+ export interface ApplePayProps {
8
+ customUIRender?: (props: {
9
+ initPaymentRequest?: () => void;
10
+ paymentErrors?: string | null;
11
+ }) => JSX.Element | null;
12
+ }
13
+
14
+ export default function ApplePay({ customUIRender }: ApplePayProps) {
8
15
  const { walletPaymentData } = useAppSelector(
9
16
  (state: RootState) => state.checkout
10
17
  );
@@ -14,6 +21,13 @@ export default function ApplePay() {
14
21
  return null;
15
22
  }
16
23
 
24
+ if (customUIRender) {
25
+ return customUIRender({
26
+ initPaymentRequest,
27
+ paymentErrors
28
+ });
29
+ }
30
+
17
31
  return (
18
32
  <div>
19
33
  <button onClick={initPaymentRequest}>Pay with Apple Pay</button>