@progressive-development/pd-page 0.1.36 → 0.1.37
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.
- package/package.json +1 -1
- package/src/PdMenu.js +15 -1
package/package.json
CHANGED
package/src/PdMenu.js
CHANGED
|
@@ -246,7 +246,7 @@ export class PdMenu extends LitElement {
|
|
|
246
246
|
|
|
247
247
|
return html`
|
|
248
248
|
<div class="menu-container">
|
|
249
|
-
<slot @click="${
|
|
249
|
+
<slot @click="${this._logoClicked}" name="slotLogo"></slot>
|
|
250
250
|
<ul>
|
|
251
251
|
${this._renderItems(this._smallScreen ? [...this.menuItems, ...this.topMenuItems] : this.menuItems, true, this._smallScreen)}
|
|
252
252
|
</ul>
|
|
@@ -348,4 +348,18 @@ export class PdMenu extends LitElement {
|
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
+
|
|
352
|
+
// eslint-disable-next-line class-methods-use-this
|
|
353
|
+
_logoClicked() {
|
|
354
|
+
PdMenu._scrollToTop();
|
|
355
|
+
this.dispatchEvent(
|
|
356
|
+
new CustomEvent('route-event', {
|
|
357
|
+
detail: {
|
|
358
|
+
route: 'home',
|
|
359
|
+
},
|
|
360
|
+
composed: true,
|
|
361
|
+
bubbles: true,
|
|
362
|
+
})
|
|
363
|
+
);
|
|
364
|
+
}
|
|
351
365
|
}
|