@progressive-development/pd-page 0.1.36 → 0.1.38
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 +16 -1
package/package.json
CHANGED
package/src/PdMenu.js
CHANGED
|
@@ -127,6 +127,7 @@ export class PdMenu extends LitElement {
|
|
|
127
127
|
width: 100%;
|
|
128
128
|
padding: var(--pd-menu-logo-padding, 2em);
|
|
129
129
|
fill: var(--pd-menu-logo-color, #067394);
|
|
130
|
+
cursor: pointer;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
|
|
@@ -246,7 +247,7 @@ export class PdMenu extends LitElement {
|
|
|
246
247
|
|
|
247
248
|
return html`
|
|
248
249
|
<div class="menu-container">
|
|
249
|
-
<slot @click="${
|
|
250
|
+
<slot @click="${this._logoClicked}" name="slotLogo"></slot>
|
|
250
251
|
<ul>
|
|
251
252
|
${this._renderItems(this._smallScreen ? [...this.menuItems, ...this.topMenuItems] : this.menuItems, true, this._smallScreen)}
|
|
252
253
|
</ul>
|
|
@@ -348,4 +349,18 @@ export class PdMenu extends LitElement {
|
|
|
348
349
|
});
|
|
349
350
|
}
|
|
350
351
|
}
|
|
352
|
+
|
|
353
|
+
// eslint-disable-next-line class-methods-use-this
|
|
354
|
+
_logoClicked() {
|
|
355
|
+
PdMenu._scrollToTop();
|
|
356
|
+
this.dispatchEvent(
|
|
357
|
+
new CustomEvent('route-event', {
|
|
358
|
+
detail: {
|
|
359
|
+
route: 'home',
|
|
360
|
+
},
|
|
361
|
+
composed: true,
|
|
362
|
+
bubbles: true,
|
|
363
|
+
})
|
|
364
|
+
);
|
|
365
|
+
}
|
|
351
366
|
}
|