@aurelia-mdc-web/image-list
Version:
Wrapper for Material Components Web Image List
39 lines • 1.95 kB
JavaScript
define(["require", "exports", "tslib", "aurelia-framework", "aurelia-typed-observable-plugin"], function (require, exports, tslib_1, aurelia_framework_1, aurelia_typed_observable_plugin_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MdcImageListItem = void 0;
/**
* 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));
};
tslib_1.__decorate([
aurelia_typed_observable_plugin_1.bindable.none,
tslib_1.__metadata("design:type", String)
], MdcImageListItem.prototype, "src", void 0);
tslib_1.__decorate([
aurelia_typed_observable_plugin_1.bindable.none,
tslib_1.__metadata("design:type", String)
], MdcImageListItem.prototype, "label", void 0);
tslib_1.__decorate([
aurelia_typed_observable_plugin_1.bindable.number,
tslib_1.__metadata("design:type", Number)
], MdcImageListItem.prototype, "aspect", void 0);
MdcImageListItem = tslib_1.__decorate([
(0, aurelia_framework_1.inject)(Element),
(0, aurelia_framework_1.useView)(aurelia_framework_1.PLATFORM.moduleName('./mdc-image-list-item.html')),
(0, aurelia_framework_1.customElement)('mdc-image-list-item'),
tslib_1.__metadata("design:paramtypes", [HTMLElement])
], MdcImageListItem);
return MdcImageListItem;
}());
exports.MdcImageListItem = MdcImageListItem;
});
//# sourceMappingURL=mdc-image-list-item.js.map