Merge pull request #3992 from thearyadev/feat/enter-to-select-model-indicator

feat: add indicator for enter-triggered model selection
This commit is contained in:
Timothy Jaeryang Baek 2024-07-19 13:41:43 +02:00 committed by GitHub
commit 36318e8a1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -244,18 +244,20 @@
show = false;
}
}}
/>
</div>
<hr class="border-gray-100 dark:border-gray-800" />
{/if}
<div class="px-3 my-2 max-h-64 overflow-y-auto scrollbar-hidden">
{#each filteredItems as item}
<div class="px-3 my-2 max-h-64 overflow-y-auto scrollbar-hidden group">
{#each filteredItems as item, index}
<button
aria-label="model-item"
class="flex w-full text-left font-medium line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-none transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg cursor-pointer data-[highlighted]:bg-muted"
class="flex w-full text-left font-medium line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-none transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg cursor-pointer data-[highlighted]:bg-muted {index ===
0
? 'bg-gray-100 dark:bg-gray-800 group-hover:bg-transparent'
: ''}"
on:click={() => {
value = item.value;