@artaio/arta-browser 2.10.3-drawer-paddingd1bcbe67ba0e6daa45df8fa49571d2b4fca90481 → 2.11.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 (2) hide show
  1. package/README.md +15 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -36,13 +36,27 @@ import Arta from '@artaio/arta-browser';
36
36
  // On load
37
37
  Arta.init('<YOUR_API_KEY>');
38
38
  ... // Your code
39
+ ```
39
40
 
41
+ #### For Estimates widget
42
+ ```jsx
40
43
  // On widget display
41
44
  const estimate = Arta.estimate({origin, objects}, config); // check types for more details
42
45
  await esimate.validate(); // mandatory for setting estimate.isReady
43
46
 
44
47
  // estimate.open() will render the widget
45
- esimate.isRead && <Button onClick={() => estimate.open()}>
48
+ esimate.isReady && <Button onClick={() => estimate.open()}>
49
+ ```
50
+
51
+ #### For Tracking widget
52
+ ```jsx
53
+ // On widget display
54
+ const shipmentId = '450727fa-9036-4252-8a86-02af6f09caa6'; // arta shipment UUId
55
+ const tracking = Arta.tracking(shipmentId, config); // check types for more details
56
+ await esimate.validate(); // mandatory for setting tracking.isReady
57
+
58
+ // tracking.open() will render the widget
59
+ esimate.isReady && <Button onClick={() => tracking.open()}>
46
60
  ```
47
61
 
48
62
  For more details and examples using different frontend frameworks please check https://github.com/artaio/arta-browser-examples.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/arta-browser",
3
- "version": "2.10.3-drawer-paddingd1bcbe67ba0e6daa45df8fa49571d2b4fca90481",
3
+ "version": "2.11.0",
4
4
  "description": "",
5
5
  "source": "lib/index.ts",
6
6
  "main": "./dist/index.js",