mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 10:20:42 +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>
|
<span v-else class="block truncate u-text-gray-400">{{ placeholder }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
<span :class="iconWrapperClass">
|
<span :class="iconWrapperClass">
|
||||||
<Icon name="heroicons-solid:selector" :class="iconClass" aria-hidden="true" />
|
<Icon :name="iconName" :class="iconClass" aria-hidden="true" />
|
||||||
</span>
|
</span>
|
||||||
</ListboxButton>
|
</ListboxButton>
|
||||||
|
|
||||||
@@ -93,6 +93,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: () => $ui.selectCustom.base
|
default: () => $ui.selectCustom.base
|
||||||
},
|
},
|
||||||
|
icon: {
|
||||||
|
type: String,
|
||||||
|
default: () => $ui.selectCustom.icon
|
||||||
|
},
|
||||||
iconBaseClass: {
|
iconBaseClass: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => $ui.selectCustom.icon.base
|
default: () => $ui.selectCustom.icon.base
|
||||||
|
|||||||
@@ -189,8 +189,10 @@ export default (variantColors: string[]) => {
|
|||||||
const selectCustom = {
|
const selectCustom = {
|
||||||
...select,
|
...select,
|
||||||
base: `${select.base} text-left cursor-default`,
|
base: `${select.base} text-left cursor-default`,
|
||||||
|
icon: 'heroicons-solid:selector',
|
||||||
list: {
|
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: {
|
option: {
|
||||||
base: 'cursor-default select-none relative py-2 pl-4 pr-10',
|
base: 'cursor-default select-none relative py-2 pl-4 pr-10',
|
||||||
active: 'text-white bg-primary-600',
|
active: 'text-white bg-primary-600',
|
||||||
|
|||||||
Reference in New Issue
Block a user