From 8f9e0a4a50bd2d20b4ca2ba9fc412028131da912 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Sat, 2 Jul 2022 00:26:25 +0200 Subject: [PATCH] chore(SelectCustom): allow override of icon --- src/runtime/components/forms/SelectCustom.vue | 6 +++++- src/runtime/presets/default.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/forms/SelectCustom.vue b/src/runtime/components/forms/SelectCustom.vue index 3604fece..6bfa23eb 100644 --- a/src/runtime/components/forms/SelectCustom.vue +++ b/src/runtime/components/forms/SelectCustom.vue @@ -13,7 +13,7 @@ {{ placeholder }} - @@ -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 diff --git a/src/runtime/presets/default.ts b/src/runtime/presets/default.ts index 373a13fa..1f11fb05 100644 --- a/src/runtime/presets/default.ts +++ b/src/runtime/presets/default.ts @@ -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',