chore(SelectCustom): add slot on button

This commit is contained in:
Benjamin Canac
2022-02-15 12:54:22 +01:00
parent 8492e161db
commit 223a477a5e

View File

@@ -8,8 +8,10 @@
<input :value="modelValue" :required="required" class="absolute inset-0 w-px opacity-0 cursor-default">
<ListboxButton :class="selectCustomClass">
<span v-if="modelValue && modelValue[textAttribute]" class="block truncate">{{ modelValue[textAttribute] }}</span>
<span v-else class="block truncate u-text-gray-400">{{ placeholder }}</span>
<slot>
<span v-if="modelValue" class="block truncate">{{ modelValue[textAttribute] }}</span>
<span v-else class="block truncate u-text-gray-400">{{ placeholder }}</span>
</slot>
<span :class="iconWrapperClass">
<Icon name="heroicons-solid:selector" :class="iconClass" aria-hidden="true" />
</span>