@akinon/pz-apple-pay 2.0.0-beta.1 → 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,46 @@
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
+
9
+ ## 2.0.0-beta.10
10
+
11
+ ### Minor Changes
12
+
13
+ - 2806320: ZERO-3390: Update version tailwindcss, autoprefixer, tailwind-merge, postcss
14
+
15
+ ## 2.0.0-beta.9
16
+
17
+ ### Minor Changes
18
+
19
+ - 0fe7711: ZERO-3387: Upgrade nextjs, eslint-config-next
20
+
21
+ ## 2.0.0-beta.8
22
+
23
+ ## 2.0.0-beta.7
24
+
25
+ ## 2.0.0-beta.6
26
+
27
+ ### Minor Changes
28
+
29
+ - 8f05f9b: ZERO-3250: Beta branch synchronized with Main branch
30
+
31
+ ## 2.0.0-beta.5
32
+
33
+ ## 2.0.0-beta.4
34
+
35
+ ## 2.0.0-beta.3
36
+
37
+ ## 2.0.0-beta.2
38
+
39
+ ### Minor Changes
40
+
41
+ - a006015: ZERO-3116: Add not-found page and update default middleware.
42
+ - 1eeb3d8: ZERO-3116: Add not found page
43
+
3
44
  ## 2.0.0-beta.1
4
45
 
5
46
  ### 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.1",
3
+ "version": "2.0.0-beta.11",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
package/readme.md CHANGED
@@ -2,20 +2,10 @@
2
2
 
3
3
  ## Installation
4
4
 
5
- There are two ways to install the Apple Pay plugin:
6
-
7
- ### 1. Install the npm package using Yarn
8
-
9
- For the latest version, you can install the package using Yarn:
5
+ You can use the following command to install the extension with the latest plugins:
10
6
 
11
7
  ```bash
12
- yarn add @akinon/pz-apple-pay
13
- ```
14
-
15
- ### 2. Preferred installation method
16
8
 
17
- You can also use the following command to install the extension with the latest plugins:
18
-
19
- ```bash
20
9
  npx @akinon/projectzero@latest --plugins
10
+
21
11
  ```
@@ -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>