Last active
December 10, 2020 05:23
-
-
Save progrium/56db6fd22a0168d1a3e9642d0d70fecd to your computer and use it in GitHub Desktop.
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
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> | |
`}> | |
</div>`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment