Skip to content

Instantly share code, notes, and snippets.

Last active Dec 10, 2020
What would you like to do?
function ItemList(items: Item[]) {
return html`
<div class="flex flex-row">
<for each=${items} do=${(item) => html`
<if cond=${item.enabled} then=${() => html`
<div class="text-white mx-2">${item.label}</div>
`} else=${() => html`
<div class="text-gray font-bold">No items</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment