@@ -19,7 +19,7 @@ diff --git a/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.html b/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.html new file mode 100644 index 00000000..0d1d0203 --- /dev/null +++ b/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.html @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.js b/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.js new file mode 100644 index 00000000..de43d97d --- /dev/null +++ b/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.js @@ -0,0 +1,24 @@ +/* + Copyright (c) 2020, salesforce.com, inc. + All rights reserved. + SPDX-License-Identifier: BSD-3-Clause + For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause +*/ +import { LightningElement, api } from 'lwc'; + +export default class LineItemTotal extends LightningElement { + @api itemDiscountTotal; + @api itemNonAdjustedTotal; + + get discountTotal() { + return this.itemDiscountTotal.toFixed(2); + } + + get nonAdjustedTotal() { + return this.itemNonAdjustedTotal.toFixed(2); + } + + get showNonAjustedTotal() { + return this.itemDiscountTotal !== this.itemNonAdjustedTotal; + } +} diff --git a/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.scss b/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.scss new file mode 100644 index 00000000..5c033546 --- /dev/null +++ b/packages/storefront-lwc/src/modules/commerce/lineItemTotal/lineItemTotal.scss @@ -0,0 +1,13 @@ +@import "../../../scss/ux_variables"; + +.strike-through { + text-decoration: line-through; + color: $light-gray; + font-weight: $font-weight-normal; + font-size: 1rem; + text-align: left; +} + +.line-item-total-discout-amount { + font-weight: bold; +} \ No newline at end of file diff --git a/packages/storefront-lwc/src/modules/commerce/popularCategories/popularCategories.html b/packages/storefront-lwc/src/modules/commerce/popularCategories/popularCategories.html index a0ae4862..6fd1caa2 100644 --- a/packages/storefront-lwc/src/modules/commerce/popularCategories/popularCategories.html +++ b/packages/storefront-lwc/src/modules/commerce/popularCategories/popularCategories.html @@ -14,42 +14,42 @@