@akinon/pz-apple-pay 2.0.0-beta.10 → 2.0.0-beta.12
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 +12 -0
- package/package.json +1 -1
- package/src/views/index.tsx +16 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @akinon/pz-apple-pay
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.12
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1d79e32: ZERO-3540: Next.js Upgrade to 15.4.5
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.11
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
|
|
14
|
+
|
|
3
15
|
## 2.0.0-beta.10
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
package/src/views/index.tsx
CHANGED
|
@@ -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
|
|
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>
|