summaryrefslogtreecommitdiff
path: root/examples/integrations-playground/src
diff options
context:
space:
mode:
authorGravatar Tony Sullivan <tony.f.sullivan@outlook.com> 2022-06-29 20:56:51 +0000
committerGravatar GitHub <noreply@github.com> 2022-06-29 20:56:51 +0000
commit51d5dc478993a994268391a5f13eec32ae29f665 (patch)
treee572d7286d277b959431a82d236690f164d6634e /examples/integrations-playground/src
parente667477103cdd8f420d7dc86d55d5bebe86ef4e2 (diff)
downloadastro-51d5dc478993a994268391a5f13eec32ae29f665.tar.gz
astro-51d5dc478993a994268391a5f13eec32ae29f665.tar.zst
astro-51d5dc478993a994268391a5f13eec32ae29f665.zip
Updates an error handler to expect updated `@astrojs/lit` behavior (#3766)
* fix: don't throw an error when the lit renderer doesn't provide a clientEntrypoint * updating the framework-lit example to match new behavior * fix: updating the playground example to latest lit syntax
Diffstat (limited to 'examples/integrations-playground/src')
-rw-r--r--examples/integrations-playground/src/components/calc-add.js (renamed from examples/integrations-playground/src/components/Test.js)6
-rw-r--r--examples/integrations-playground/src/components/my-counter.js (renamed from examples/integrations-playground/src/components/Counter.js)6
-rw-r--r--examples/integrations-playground/src/pages/index.astro8
3 files changed, 8 insertions, 12 deletions
diff --git a/examples/integrations-playground/src/components/Test.js b/examples/integrations-playground/src/components/calc-add.js
index 7f565f777..b0b3978bf 100644
--- a/examples/integrations-playground/src/components/Test.js
+++ b/examples/integrations-playground/src/components/calc-add.js
@@ -1,8 +1,6 @@
import { LitElement, html } from 'lit';
-export const tagName = 'calc-add';
-
-class CalcAdd extends LitElement {
+export class CalcAdd extends LitElement {
static get properties() {
return {
num: {
@@ -16,4 +14,4 @@ class CalcAdd extends LitElement {
}
}
-customElements.define(tagName, CalcAdd);
+customElements.define('calc-add', CalcAdd);
diff --git a/examples/integrations-playground/src/components/Counter.js b/examples/integrations-playground/src/components/my-counter.js
index 35fa8dbbb..adc9e4a3d 100644
--- a/examples/integrations-playground/src/components/Counter.js
+++ b/examples/integrations-playground/src/components/my-counter.js
@@ -1,8 +1,6 @@
import { LitElement, html } from 'lit';
-export const tagName = 'my-counter';
-
-class Counter extends LitElement {
+export class MyCounter extends LitElement {
static get properties() {
return {
count: {
@@ -31,4 +29,4 @@ class Counter extends LitElement {
}
}
-customElements.define(tagName, Counter);
+customElements.define('my-counter', MyCounter);
diff --git a/examples/integrations-playground/src/pages/index.astro b/examples/integrations-playground/src/pages/index.astro
index 06c9aa3d8..66475f3e7 100644
--- a/examples/integrations-playground/src/pages/index.astro
+++ b/examples/integrations-playground/src/pages/index.astro
@@ -2,8 +2,8 @@
import Lorem from '../components/Lorem.astro';
import Link from '../components/Link.jsx';
import SolidCounter from '../components/SolidCounter.jsx';
-import '../components/Test.js';
-import '../components/Counter.js';
+import { CalcAdd } from '../components/calc-add.js';
+import { MyCounter } from '../components/my-counter.js';
---
<!DOCTYPE html>
@@ -18,11 +18,11 @@ import '../components/Counter.js';
<strong>Party Mode!</strong>
Colors changing = partytown is enabled
</h2>
- <my-counter client:load></my-counter>
+ <MyCounter client:load></MyCounter>
<SolidCounter client:load></SolidCounter>
<Link to="/foo" text="Go to Page 2" />
<Lorem />
- <calc-add num={33}></calc-add>
+ <CalcAdd num={33}></CalcAdd>
<script type="text/partytown">
// Remove `type="text/partytown"` to see this block the page
// and cause the page to become unresponsive