@ucd-lib/theme-elements 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,6 +55,22 @@ export default class UcdThemeBrandTextbox extends LitElement {
|
|
|
55
55
|
return out;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* @method _onSlotchange
|
|
60
|
+
* @param {Event} e
|
|
61
|
+
* @description fires when a slot value changes.
|
|
62
|
+
* assigns category-brand__background class so that slotted children are correct color
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
_onSlotchange(e){
|
|
66
|
+
const childNodes = e.target.assignedNodes({flatten: true});
|
|
67
|
+
childNodes.forEach(child => {
|
|
68
|
+
if ( child.nodeType === Node.ELEMENT_NODE ){
|
|
69
|
+
child.classList.add('category-brand__background');
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
58
74
|
}
|
|
59
75
|
|
|
60
76
|
customElements.define('ucd-theme-brand-textbox', UcdThemeBrandTextbox);
|