-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ | |
import { css, html, LitElement } from "https://esm.sh/[email protected]"; | ||
|
||
export class CustomAlert extends LitElement { | ||
// Needed for TypeScript since it does not recognize TS properties | ||
// as class-level variables | ||
icon = ""; | ||
theme = ""; | ||
static get styles() { | ||
return css` | ||
:host { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { css, html, LitElement } from "https://esm.sh/[email protected]"; | ||
|
||
// @ts-ignore LSP does not recognize LitElement syntax | ||
export class MyLitMessage extends LitElement { | ||
// Needed for TypeScript since it does not recognize TS properties | ||
// as class-level variables | ||
message = ""; | ||
// Properties are the component attributes | ||
static get properties(): { message: string } { | ||
static get properties() { | ||
return { | ||
message: "", | ||
message: { type: String, state: false }, | ||
}; | ||
} | ||
static get styles() { | ||
|
@@ -20,7 +22,9 @@ export class MyLitMessage extends LitElement { | |
|
||
render() { | ||
return html` | ||
<p>The message: <span class="message">${this.message}</span></p> | ||
<p>The message: | ||
<span class="message">${this.message}</span> | ||
</p> | ||
`; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters