@aurelia-mdc-web/list
Version:
Wrapper for Material Components Web List
35 lines • 1.2 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
*/
let MdcListGroup = class MdcListGroup {
headersChanged() {
this.headers.forEach(x => 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);
export { MdcListGroup };
let MdcListGroupSubheader = class MdcListGroupSubheader {
constructor(root) {
this.root = root;
}
attached() {
this.root.classList.add('mdc-list-group__subheader');
}
};
MdcListGroupSubheader = __decorate([
inject(Element),
customAttribute('mdc-list-group-subheader'),
__metadata("design:paramtypes", [HTMLElement])
], MdcListGroupSubheader);
export { MdcListGroupSubheader };
//# sourceMappingURL=mdc-list-group.js.map