File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed
site-server/src/catalog/routes/catalog Expand file tree Collapse file tree 3 files changed +43
-0
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
+
10
+ @customElement ( 'wco-catalog-search' )
11
+ export class WCOCatalogSearch extends LitElement {
12
+ static styles = css `
13
+ :host {
14
+ display: flex;
15
+ align-items: center;
16
+ }
17
+ ` ;
18
+
19
+ render ( ) {
20
+ return html `
21
+ Search: < input >
22
+ ` ;
23
+ }
24
+ }
25
+
26
+ declare global {
27
+ interface HTMLElementTagNameMap {
28
+ 'wco-catalog-search' : WCOCatalogSearch ;
29
+ }
30
+ }
31
+
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 '../components/wco-catalog-search.js' ;
8
+ import '../components/wco-top-bar.js' ;
Original file line number Diff line number Diff line change @@ -17,8 +17,12 @@ export const handleCatalogRoute = async (
17
17
) => {
18
18
context . body = renderPage ( {
19
19
title : `Web Components Catalog` ,
20
+ scripts : [
21
+ './js/catalog.js'
22
+ ] ,
20
23
content : `
21
24
<h1>Catalog</h1>
25
+ <wco-catalog-search></wco-catalog-search>
22
26
` ,
23
27
} ) ;
24
28
context . type = 'html' ;
You can’t perform that action at this time.
0 commit comments