From 1950dc47ae8c5ca721851999afb2ce32b7c5c4cb Mon Sep 17 00:00:00 2001 From: whoswhip Date: Tue, 30 Dec 2025 11:20:03 -0500 Subject: [PATCH] feat: add variant support for dropdown component styling --- .../src/lib/components/Dropdown.svelte | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/SharpbinV3.Client/src/lib/components/Dropdown.svelte b/SharpbinV3.Client/src/lib/components/Dropdown.svelte index 0c3def2..f74b882 100644 --- a/SharpbinV3.Client/src/lib/components/Dropdown.svelte +++ b/SharpbinV3.Client/src/lib/components/Dropdown.svelte @@ -11,6 +11,7 @@ export let displayValue: (val: string | number) => string = (val) => { return options.find((o) => o.value === val)?.label ?? String(val); }; + export let variant: string = ''; let isOpen = false; let searchQuery = ''; @@ -55,11 +56,12 @@ -
+
@@ -67,12 +69,14 @@ {#if isOpen}
{#if searchable} @@ -85,6 +89,7 @@ on:click={() => handleSelect(option.value)} class="w-full border-b border-neutral-700 px-3 py-2 text-left last:border-b-0 hover:bg-neutral-600" class:bg-neutral-700={value === option.value} + class:dropdown-sm-option={variant === 'sm'} > {option.label} @@ -93,3 +98,33 @@
{/if}
+ +