@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/PdMenu.js +16 -1
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Progressive development page helper, teaser, menu, footer.",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "PD Progressive Development",
6
- "version": "0.1.36",
6
+ "version": "0.1.38",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
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="${PdMenu._scrollToTop}" name="slotLogo"></slot>
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
  }