UNPKG

fonteva-design-guide

Version:

## Dev, Build and Test

19 lines (15 loc) 431 B
import { LightningElement, api, track } from 'lwc'; import "c/utils"; import {arrSum} from "c/utils"; export default class PfmOrderTotals extends LightningElement { @api items; @api totalLabel = 'Total'; @api currencyIsoCode; @track total; connectedCallback() {} renderedCallback() { if (this.items) { this.total = arrSum(this.items,i => i.total); } } }