@akinon/pz-apple-pay 1.89.0-snapshot-ZERO-3400-20250516071934 → 1.90.0

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,6 +1,12 @@
1
1
  # @akinon/pz-apple-pay
2
2
 
3
- ## 1.89.0-snapshot-ZERO-3400-20250516071934
3
+ ## 1.90.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f2e9d1d: ZERO-3383: Add custom UI rendering option for apple pay
8
+
9
+ ## 1.89.0
4
10
 
5
11
  ## 1.88.0
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-apple-pay",
3
- "version": "1.89.0-snapshot-ZERO-3400-20250516071934",
3
+ "version": "1.90.0",
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>