lion/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-e/page-e.js
okadurin 70b0241189 feat: initial Astro integration
Co-authored-by: Oleksii Kadurin <ovkadurin@gmail.com>; Thijs Louisse <Thijs.Louisse@ing.com>
2025-10-03 09:37:32 +02:00

33 lines
814 B
JavaScript

import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageE extends LitElement {
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page A</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays.blockBody}</p>
<button @click=${() => {
overlays.block(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlock(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-e', PageE);