@artaio/arta-browser
Advanced tools
Comparing version 2.10.2-reenable-ci2e23e198c935a27a88bc1079d122eb257abf9d7d to 2.10.3-add-tracking-widget4ad36f0b32b0a9b532252256426886e74394c76c
{ | ||
"name": "@artaio/arta-browser", | ||
"version": "2.10.2-reenable-ci2e23e198c935a27a88bc1079d122eb257abf9d7d", | ||
"version": "2.10.3-add-tracking-widget4ad36f0b32b0a9b532252256426886e74394c76c", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "source": "lib/index.ts", |
@@ -39,3 +39,6 @@ # arta-browser | ||
... // Your code | ||
``` | ||
#### For Estimates widget | ||
```jsx | ||
// On widget display | ||
@@ -46,5 +49,16 @@ const estimate = Arta.estimate({origin, objects}, config); // check types for more details | ||
// estimate.open() will render the widget | ||
esimate.isRead && <Button onClick={() => estimate.open()}> | ||
esimate.isReady && <Button onClick={() => estimate.open()}> | ||
``` | ||
#### For Tracking widget | ||
```jsx | ||
// On widget display | ||
const shipmentId = '450727fa-9036-4252-8a86-02af6f09caa6'; // arta shipment UUId | ||
const tracking = Arta.tracking(shipmentId, config); // check types for more details | ||
await esimate.validate(); // mandatory for setting tracking.isReady | ||
// tracking.open() will render the widget | ||
esimate.isReady && <Button onClick={() => tracking.open()}> | ||
``` | ||
For more details and examples using different frontend frameworks please check https://github.com/artaio/arta-browser-examples. | ||
@@ -51,0 +65,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
445822
6132
73