Skip to content

Instantly share code, notes, and snippets.

@MatthiasKainer
Last active March 8, 2022 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatthiasKainer/410795b0c437936124002afde32cdd52 to your computer and use it in GitHub Desktop.
Save MatthiasKainer/410795b0c437936124002afde32cdd52 to your computer and use it in GitHub Desktop.
import {
html,
css
} from "lit";
import {
pureLit
} from "pure-lit"
const blockStyle = css`:host { display: block; }`
pureLit("hello-world",
({who}: { who: string }) => html`Hello ${who}!`,
{
styles: [blockStyle],
defaults: { who: "noone" }
}
);
pureLit("greet-em",
() => html`<div>${["george", "john"].map(n =>
html`<hello-world who=${n}></hello-world>`
)}</div>`
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment