@blockquote/create-wc 1.11.0 → 1.12.0
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
CHANGED
|
@@ -3,7 +3,7 @@ import { property } from 'lit/decorators.js';
|
|
|
3
3
|
import styles from './styles/<%= className %>-styles.js';
|
|
4
4
|
|
|
5
5
|
export class <%= className %> extends LitElement {
|
|
6
|
-
static get is() {
|
|
6
|
+
static get is(): string {
|
|
7
7
|
return '<%= tagName %>';
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -24,13 +24,13 @@ export class <%= className %> extends LitElement {
|
|
|
24
24
|
override render() {
|
|
25
25
|
return html`
|
|
26
26
|
<h1>${this.sayHello(this.heading)}!</h1>
|
|
27
|
-
<button @click=${this
|
|
27
|
+
<button @click=${this.#onClick}>Counter: ${this.counter}</button>
|
|
28
28
|
<hr />
|
|
29
29
|
<slot></slot>
|
|
30
30
|
`;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
#onClick() {
|
|
34
34
|
this.counter += 1;
|
|
35
35
|
this.dispatchEvent(new CustomEvent('counter-changed', { detail: this.counter }));
|
|
36
36
|
}
|
|
@@ -44,3 +44,9 @@ export class <%= className %> extends LitElement {
|
|
|
44
44
|
return `Hello, ${heading}`;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
'<%= tagName %>': <%= className %>;
|
|
51
|
+
}
|
|
52
|
+
}
|