Skip to content

Commit c1dc0cd

Browse files
committed
Cleaning up examples.
1 parent e154b3b commit c1dc0cd

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<div class="example">
22
<pg-json part="json"></pg-json>
3+
<pre part="output"></pre>
34
</div>

src/pg/json/__examples__/basic/basic.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import template from './basic.html';
1010
})
1111
export default class XPgJsonBasic extends HTMLElement {
1212
@Part() $json: PgJson;
13+
@Part() $output: HTMLPreElement;
1314

1415
connectedCallback() {
1516
this.$json.value = {
@@ -24,7 +25,7 @@ export default class XPgJsonBasic extends HTMLElement {
2425
if (value !== parent[key]) {
2526
parent[key] = value;
2627
}
27-
console.log(this.$json.value);
28+
this.$output.textContent = JSON.stringify(this.$json.value);
2829
});
2930
}
3031
}

src/pg/jsonNumber/jsonNumber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class PgJsonNumber extends HTMLElement {
2424
detail: {
2525
path: [this.key],
2626
key: this.key,
27-
value: e.detail.value,
27+
value: Number.parseInt(e.detail.value, 10),
2828
}
2929
})
3030
);

0 commit comments

Comments
 (0)