@aurelia-mdc-web/image-list
Version:
Wrapper for Material Components Web Image List
36 lines • 1.24 kB
JavaScript
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
*/
let MdcImageListItem = class MdcImageListItem {
constructor(root) {
this.root = root;
}
aspectChanged() {
this.hasAspect = !isNaN(this.aspect);
this.root.style.setProperty('--mdc-image-list-item-aspect', isNaN(this.aspect) ? '1' : `${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);
export { MdcImageListItem };
//# sourceMappingURL=mdc-image-list-item.js.map