Skip to content

Commit 75dbd06

Browse files
Add stub catalog widget (#1369)
1 parent 3abc31d commit 75dbd06

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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';

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ export const handleCatalogRoute = async (
1717
) => {
1818
context.body = renderPage({
1919
title: `Web Components Catalog`,
20+
scripts: [
21+
'./js/catalog.js'
22+
],
2023
content: `
2124
<h1>Catalog</h1>
25+
<wco-catalog-search></wco-catalog-search>
2226
`,
2327
});
2428
context.type = 'html';

0 commit comments

Comments
 (0)