feat: better example to show observed attrs are only smallcase
This commit is contained in:
parent
bef423fde1
commit
aabbb09c89
2 changed files with 5 additions and 4 deletions
|
@ -2,15 +2,16 @@ import WebComponent from "../src/WebComponent.js";
|
|||
|
||||
export class BooleanPropTest extends WebComponent {
|
||||
isInline = false;
|
||||
anotherone = false;
|
||||
|
||||
static properties = ["is-inline"];
|
||||
static properties = ["is-inline", "anotherone"];
|
||||
|
||||
onChanges(changes) {
|
||||
console.log(">>> boolean prop test", changes);
|
||||
}
|
||||
|
||||
get template() {
|
||||
return `<span>${this.isInline}</span>`;
|
||||
return `<p>is-inline: ${this.isInline}</p><p>another-one: ${this.anotherone}</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<body>
|
||||
<hello-world id="hey" data-name="Ayo" emotion="sad"></hello-world>
|
||||
<p>
|
||||
<simple-text greeting="hey"></simple-text>
|
||||
<simple-text></simple-text>
|
||||
</p>
|
||||
<p>
|
||||
<boolean-prop-test></boolean-prop-test>
|
||||
<boolean-prop-test is-inline anotherOne></boolean-prop-test>
|
||||
</p>
|
||||
|
||||
<script type="module">
|
||||
|
|
Loading…
Reference in a new issue