@aurelia-mdc-web/list
Version:
Wrapper for Material Components Web List
39 lines • 1.48 kB
JavaScript
import { __decorate, __metadata } from "tslib";
import { inlineView, customElement, children, customAttribute, inject } from 'aurelia-framework';
/**
* Optional. Wrapper around two or more mdc-list elements to be grouped together.
* @selector mdc-list-group
*/
var MdcListGroup = /** @class */ (function () {
function MdcListGroup() {
}
MdcListGroup.prototype.headersChanged = function () {
this.headers.forEach(function (x) { return x.classList.add('mdc-list-group__subheader'); });
};
__decorate([
children('h1,h2,h3,h4,h5,h6'),
__metadata("design:type", Array)
], MdcListGroup.prototype, "headers", void 0);
MdcListGroup = __decorate([
inlineView('<template class="mdc-list-group"><slot></slot></template>'),
customElement('mdc-list-group')
], MdcListGroup);
return MdcListGroup;
}());
export { MdcListGroup };
var MdcListGroupSubheader = /** @class */ (function () {
function MdcListGroupSubheader(root) {
this.root = root;
}
MdcListGroupSubheader.prototype.attached = function () {
this.root.classList.add('mdc-list-group__subheader');
};
MdcListGroupSubheader = __decorate([
inject(Element),
customAttribute('mdc-list-group-subheader'),
__metadata("design:paramtypes", [HTMLElement])
], MdcListGroupSubheader);
return MdcListGroupSubheader;
}());
export { MdcListGroupSubheader };
//# sourceMappingURL=mdc-list-group.js.map