mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
chore(SelectCustom): allow override of icon
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<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" />
|
||||
<Icon :name="iconName" :class="iconClass" aria-hidden="true" />
|
||||
</span>
|
||||
</ListboxButton>
|
||||
|
||||
@@ -93,6 +93,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: () => $ui.selectCustom.base
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => $ui.selectCustom.icon
|
||||
},
|
||||
iconBaseClass: {
|
||||
type: String,
|
||||
default: () => $ui.selectCustom.icon.base
|
||||
|
||||
@@ -189,8 +189,10 @@ export default (variantColors: string[]) => {
|
||||
const selectCustom = {
|
||||
...select,
|
||||
base: `${select.base} text-left cursor-default`,
|
||||
icon: 'heroicons-solid:selector',
|
||||
list: {
|
||||
base: 'absolute z-10 mt-1 w-full u-bg-white shadow-lg max-h-60 rounded-md py-1 text-sm ring-1 u-ring-gray-200 overflow-auto focus:outline-none',
|
||||
container: 'absolute z-10 mt-1 w-full py-1 max-h-60 overflow-auto',
|
||||
base: 'u-bg-white shadow-lg rounded-md ring-1 u-ring-gray-200 focus:outline-none',
|
||||
option: {
|
||||
base: 'cursor-default select-none relative py-2 pl-4 pr-10',
|
||||
active: 'text-white bg-primary-600',
|
||||
|
||||
Reference in New Issue
Block a user