Skip to content

Commit ae5b544

Browse files
committed
Fix Select/Combobox icon
1 parent 4938b8e commit ae5b544

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

resources/js/components/ui/Combobox.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,14 @@ defineExpose({
299299
@keydown.space="openOnSpace"
300300
/>
301301
302-
<button type="button" class="w-full text-start truncate bg-transparent cursor-pointer" v-else-if="!searchable && (dropdownOpen || !modelValue)" @keydown.space="openOnSpace" data-ui-combobox-placeholder>
302+
<button type="button" class="w-full text-start truncate flex items-center gap-2 bg-transparent cursor-pointer" v-else-if="!searchable && (dropdownOpen || !modelValue)" @keydown.space="openOnSpace" data-ui-combobox-placeholder>
303+
<Icon v-if="icon" :name="icon" class="text-gray-400 dark:text-white dark:opacity-50" />
303304
<span class="text-gray-400 dark:text-gray-500" v-text="placeholder" />
304305
</button>
305306
306307
<button type="button" v-else class="w-full text-start bg-transparent truncate flex items-center gap-2 cursor-pointer" @keydown.space="openOnSpace" data-ui-combobox-selected-option>
307308
<slot name="selected-option" v-bind="{ option: selectedOption }">
308-
<Icon v-if="icon" :name="icon" class="text-white-400 dark:text-white dark:opacity-50" />
309+
<Icon v-if="icon" :name="icon" class="text-gray-400 dark:text-white dark:opacity-50" />
309310
<span v-if="labelHtml" v-html="getOptionLabel(selectedOption)" />
310311
<span v-else v-text="getOptionLabel(selectedOption)" />
311312
</slot>

resources/views/playground.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@
238238
<ui-heading size="lg">Select</ui-heading>
239239
<div class="flex">
240240
<ui-select
241+
icon="money-bag-dollar"
241242
class="w-full"
242243
label="Favorite band"
243244
:options="[

0 commit comments

Comments
 (0)