Skip to content

Commit 35673ec

Browse files
author
Tony Sullivan
committed
fix: updating the playground example to latest lit syntax
1 parent b207809 commit 35673ec

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

examples/integrations-playground/src/components/Test.js renamed to examples/integrations-playground/src/components/calc-add.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { LitElement, html } from 'lit';
22

3-
export const tagName = 'calc-add';
4-
5-
class CalcAdd extends LitElement {
3+
export class CalcAdd extends LitElement {
64
static get properties() {
75
return {
86
num: {
@@ -16,4 +14,4 @@ class CalcAdd extends LitElement {
1614
}
1715
}
1816

19-
customElements.define(tagName, CalcAdd);
17+
customElements.define('calc-add', CalcAdd);

examples/integrations-playground/src/components/Counter.js renamed to examples/integrations-playground/src/components/my-counter.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { LitElement, html } from 'lit';
22

3-
export const tagName = 'my-counter';
4-
5-
class Counter extends LitElement {
3+
export class MyCounter extends LitElement {
64
static get properties() {
75
return {
86
count: {
@@ -31,4 +29,4 @@ class Counter extends LitElement {
3129
}
3230
}
3331

34-
customElements.define(tagName, Counter);
32+
customElements.define('my-counter', MyCounter);

examples/integrations-playground/src/pages/index.astro

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import Lorem from '../components/Lorem.astro';
33
import Link from '../components/Link.jsx';
44
import SolidCounter from '../components/SolidCounter.jsx';
5-
import '../components/Test.js';
6-
import '../components/Counter.js';
5+
import { CalcAdd } from '../components/calc-add.js';
6+
import { MyCounter } from '../components/my-counter.js';
77
---
88

99
<!DOCTYPE html>
@@ -18,11 +18,11 @@ import '../components/Counter.js';
1818
<strong>Party Mode!</strong>
1919
Colors changing = partytown is enabled
2020
</h2>
21-
<my-counter client:load></my-counter>
21+
<MyCounter client:load></MyCounter>
2222
<SolidCounter client:load></SolidCounter>
2323
<Link to="/foo" text="Go to Page 2" />
2424
<Lorem />
25-
<calc-add num={33}></calc-add>
25+
<CalcAdd num={33}></CalcAdd>
2626
<script type="text/partytown">
2727
// Remove `type="text/partytown"` to see this block the page
2828
// and cause the page to become unresponsive

0 commit comments

Comments
 (0)