diff options
Diffstat (limited to 'src/lib/ListItemWithIcon.svelte')
-rw-r--r-- | src/lib/ListItemWithIcon.svelte | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/ListItemWithIcon.svelte b/src/lib/ListItemWithIcon.svelte new file mode 100644 index 0000000..2c7aade --- /dev/null +++ b/src/lib/ListItemWithIcon.svelte @@ -0,0 +1,18 @@ +<script lang="ts"> + export let url: string +</script> + +<li class="list-item-with-icon" style="background: url({url}) 0 0/1em no-repeat"> + <slot /> +</li> + +<style> + .list-item-with-icon { + list-style: none; + padding-left: 1.2em; + position: relative; + right: 1.2em; + image-rendering: crisp-edges; + image-rendering: pixelated; + } +</style> |