diff --git a/packages/lit-dev-content/site/css/global.css b/packages/lit-dev-content/site/css/global.css index e802d7bcb..2efc986ed 100644 --- a/packages/lit-dev-content/site/css/global.css +++ b/packages/lit-dev-content/site/css/global.css @@ -80,3 +80,13 @@ a { height: 1px; overflow: hidden; } + +body[code-language-preference="ts"] [code-language]:not([code-language="ts"]) { + /* Hide JS content when preference is TS. */ + display: none; +} + +body[code-language-preference="js"] [code-language]:not([code-language="js"]) { + /* Hide TS content when preference is JS. */ + display: none; +} \ No newline at end of file diff --git a/packages/lit-dev-content/site/docs/v3/components/overview.md b/packages/lit-dev-content/site/docs/v3/components/overview.md index c365610e2..9428d4981 100644 --- a/packages/lit-dev-content/site/docs/v3/components/overview.md +++ b/packages/lit-dev-content/site/docs/v3/components/overview.md @@ -26,3 +26,15 @@ Creating a Lit component involves a number of concepts: Here's a sample component: {% playground-example "v3-docs/components/overview/simple-greeting" "simple-greeting.ts" %} + +
+ +{% aside "info"%} + +This example uses TypeScript decorators. + +See the [Decorators](/docs/v3/components/decorators) documentation for more information on configuring TypeScript for decorators. + +{% endaside %} + +