Consolidate Lit repositories: figma-to-lit, figma_lit_example, lit-3d-piano, lit-calculator, lit-code-editor, lit-draggable-dom, lit-file-based-routing, lit-force-graph, lit-html-editor, lit-html-table, lit-modules, lit-native, lit-node-editor, lit-sheet-music, lit-starter-ts, lit-vscode-extension, lit-wmr, vite-lit-capacitor, vite-lit-element-starter, vite-rxdb-lit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { html, css, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
|
||||
export const headerModuleStyles = [css`
|
||||
header {
|
||||
height: 60px;
|
||||
background-color: #f5f5f5;
|
||||
color: #333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
`];
|
||||
|
||||
export interface HeaderModuleProps {
|
||||
title: string;
|
||||
}
|
||||
|
||||
export function headerModuleTemplate(props: HeaderModuleProps) {
|
||||
return html`<header>${props.title}</header>`;
|
||||
}
|
||||
|
||||
@customElement("header-module")
|
||||
export class HeaderModule extends LitElement implements HeaderModuleProps {
|
||||
static styles = headerModuleStyles;
|
||||
|
||||
@property({ type: String }) title = "Lit Modules";
|
||||
|
||||
render() {
|
||||
return headerModuleTemplate(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user