UNPKG

@aurelia-mdc-web/image-list

Version:

Wrapper for Material Components Web Image List

37 lines 1.41 kB
import { __decorate, __metadata } from "tslib"; import { customElement, useView, PLATFORM, inject } from 'aurelia-framework'; import { bindable } from 'aurelia-typed-observable-plugin'; /** * Mandatory. Indicates each item in an Image List. * @selector mdc-image-list-item */ var MdcImageListItem = /** @class */ (function () { function MdcImageListItem(root) { this.root = root; } MdcImageListItem.prototype.aspectChanged = function () { this.hasAspect = !isNaN(this.aspect); this.root.style.setProperty('--mdc-image-list-item-aspect', isNaN(this.aspect) ? '1' : "".concat(this.aspect)); }; __decorate([ bindable.none, __metadata("design:type", String) ], MdcImageListItem.prototype, "src", void 0); __decorate([ bindable.none, __metadata("design:type", String) ], MdcImageListItem.prototype, "label", void 0); __decorate([ bindable.number, __metadata("design:type", Number) ], MdcImageListItem.prototype, "aspect", void 0); MdcImageListItem = __decorate([ inject(Element), useView(PLATFORM.moduleName('./mdc-image-list-item.html')), customElement('mdc-image-list-item'), __metadata("design:paramtypes", [HTMLElement]) ], MdcImageListItem); return MdcImageListItem; }()); export { MdcImageListItem }; //# sourceMappingURL=mdc-image-list-item.js.map