Skip to content

Commit 409e649

Browse files
committed
Add wco-catalog-page
1 parent 5b5fee0 commit 409e649

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* @license
3+
* Copyright 2022 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
import {html, css, LitElement} from 'lit';
8+
import {customElement} from 'lit/decorators.js';
9+
import './wco-top-bar.js';
10+
import './wco-catalog-search.js';
11+
12+
@customElement('wco-catalog-page')
13+
export class WCOCatalogPage extends LitElement {
14+
static styles = css`
15+
:host {
16+
display: block;
17+
}
18+
`;
19+
20+
render() {
21+
return html`
22+
<wco-top-bar></wco-top-bar>
23+
<h1>Catalog</h1>
24+
<wco-catalog-search></wco-catalog-search>
25+
`;
26+
}
27+
}
28+
29+
declare global {
30+
interface HTMLElementTagNameMap {
31+
'wco-catalog-page': WCOCatalogPage;
32+
}
33+
}

packages/site-client/src/entrypoints/catalog.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import '../components/wco-catalog-search.js';
8-
import '../components/wco-top-bar.js';
7+
import '../components/wco-catalog-page.js';

packages/site-server/src/catalog/routes/catalog/catalog-route.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ export const handleCatalogRoute = async (
2626
renderPage({
2727
title: `Web Components Catalog`,
2828
scripts: ['/js/hydrate.js', '/js/catalog.js'],
29-
content: render(html`
30-
<wco-top-bar></wco-top-bar>
31-
<h1>Catalog</h1>
32-
<wco-catalog-search></wco-catalog-search>
33-
`),
29+
content: render(html`<wco-catalog-page></wco-catalog-page>`),
3430
})
3531
);
3632
context.type = 'html';

0 commit comments

Comments
 (0)