File tree Expand file tree Collapse file tree 3 files changed +35
-7
lines changed
site-server/src/catalog/routes/catalog Expand file tree Collapse file tree 3 files changed +35
-7
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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' ;
Original file line number Diff line number Diff 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' ;
You can’t perform that action at this time.
0 commit comments