@akinon/pz-one-click-checkout 1.47.0-rc.7 → 1.47.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -25
  2. package/README.md +36 -7
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,30 +1,6 @@
1
1
  # @akinon/pz-one-click-checkout
2
2
 
3
- ## 1.47.0-rc.7
4
-
5
- ### Minor Changes
6
-
7
- - 50b9069: ZERO-2767: update plugin readme files
8
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
9
-
10
- ## 1.47.0-rc.6
11
-
12
- ## 1.47.0-rc.5
13
-
14
- ## 1.47.0-rc.4
15
-
16
- ## 1.47.0-rc.3
17
-
18
- ## 1.47.0-rc.2
19
-
20
- ## 1.47.0-rc.1
21
-
22
- ## 1.47.0-rc.0
23
-
24
- ### Minor Changes
25
-
26
- - 50b9069: ZERO-2767: update plugin readme files
27
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
3
+ ## 1.47.0
28
4
 
29
5
  ## 1.46.0
30
6
 
package/README.md CHANGED
@@ -1,13 +1,42 @@
1
- # @akinon/pz-one-click-checkout
1
+ # pz-one-click-checkout
2
2
 
3
- ### Install the npm package
3
+ ### Usage in plugin module system
4
4
 
5
- ```bash
6
- # For latest version
7
- yarn add @akinon/pz-one-click-checkout
5
+ ```javascript
6
+ import PluginModule, { Component } from '@akinon/next/components/plugin-module';
8
7
 
9
- # Preferred installation method
10
- npx @akinon/projectzero@latest --plugins
8
+ <PluginModule
9
+ component={Component.OneClickCheckoutButtons}
10
+ props={{
11
+ product: data.product,
12
+ translations: {
13
+ buttonText: 'Pay with AKIFAST'
14
+ },
15
+ clearBasket: true,
16
+ addBeforeClick: variantsSelectionCheck,
17
+ openMiniBasket: false,
18
+ providers: [
19
+ {
20
+ pk: 1,
21
+ name: 'Akifast',
22
+ slug: 'akifast'
23
+ }
24
+ ],
25
+ content: (
26
+ <div className="flex items-center justify-center">
27
+ <Icon name="akinon" size={20} className="mr-2" />
28
+ <span>Pay with AKIFAST</span>
29
+ </div>
30
+ ),
31
+ onError: (error) =>
32
+ setProductError(
33
+ error?.data?.non_field_errors ||
34
+ Object.keys(error?.data).map(
35
+ (key) => `${key}: ${error?.data[key].join(', ')}`
36
+ )
37
+ )
38
+ }}
39
+ />;
11
40
  ```
12
41
 
13
42
  ## Props
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-one-click-checkout",
3
- "version": "1.47.0-rc.7",
3
+ "version": "1.47.0",
4
4
  "main": "./src/index.ts",
5
5
  "module": "./src/index.ts",
6
6
  "license": "MIT",