-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo-wise-shopping-cart.js
54 lines (50 loc) · 1.73 KB
/
demo-wise-shopping-cart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import {html, PolymerElement} from '@polymer/polymer/polymer-element.js';
import {WiseShoppingCart} from './wise-shopping-cart.js';
export class DemoWiseShoppingCart extends PolymerElement {
static get template() {
return html`
<wise-shopping-cart start-shopping-label="START SHOPPING" basket-empty-label="Your basket is empty" cart-items="[[cartItems]]"></wise-shopping-cart>
`;
}
static get properties() {
return {
cartItems: {
type: Array,
value: [
{
"uuid": "8",
"name": "Google Pixel 4",
"imagePath": "demo1.jpg",
"quantity": 2,
"price": 799,
"additionList": [
{
"uuid": "401",
"title": "memory card",
"price": 25,
"quantity": 2,
"imagePath": "http://localhost:3334/public/product_images/402881ce7010f488017010f495ef000b//public/files/402881ce7010f488017010f495ef000b/9746a26d-ea5d-4bac-b1f4-6a77994ffded.jpg"
},
{
"uuid": "402",
"title": "headphone",
"price": 20,
"quantity": 1,
"imagePath": "http://localhost:3334/public/product_images/402881ce7010f488017010f495ef000b//public/files/402881ce7010f488017010f495ef000b/9746a26d-ea5d-4bac-b1f4-6a77994ffded.jpg"
}
]
},
{
"uuid": "16",
"name": "Apple iPhone 11 Pro",
"imagePath": "demo2.jpg",
"quantity": 1,
"price": 1199,
"additionList": []
}
]
}
};
}
}
window.customElements.define('demo-wise-shopping-cart', DemoWiseShoppingCart);