From 9db8a946ceeae999a67920104c3c068277a34a28 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 15 Dec 2024 22:44:15 +0100 Subject: [PATCH] Lib: Allow icons in dropdown component list --- src/lib/components/Dropdown.svelte | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/lib/components/Dropdown.svelte b/src/lib/components/Dropdown.svelte index 33f28a4..20c962d 100644 --- a/src/lib/components/Dropdown.svelte +++ b/src/lib/components/Dropdown.svelte @@ -90,7 +90,8 @@ {#if action} event.preventDefault()} @@ -100,7 +101,8 @@ {:else} event.preventDefault()} value={get_label(input_variable) ?? placeholder} @@ -109,13 +111,26 @@ {/if} -
+
{#each options as option} - {option.label} + +
+ {#if option.icon_url} + + {/if} + {option.label} +
+
{/each}
-