From 3a6ecd69888a70d9b6bacd871c1a9da4fa9870e1 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Fri, 29 Jul 2022 11:17:04 +0200 Subject: [PATCH] chore(SelectCustom): move icons in preset --- src/runtime/components/forms/SelectCustom.vue | 4 ++-- src/runtime/presets/default.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/forms/SelectCustom.vue b/src/runtime/components/forms/SelectCustom.vue index 7cef0276..1e522802 100644 --- a/src/runtime/components/forms/SelectCustom.vue +++ b/src/runtime/components/forms/SelectCustom.vue @@ -163,7 +163,7 @@ const props = defineProps({ }, icon: { type: String, - default: () => 'heroicons-solid:selector' + default: () => $ui.selectCustom.icon.name }, iconBaseClass: { type: String, @@ -226,7 +226,7 @@ const props = defineProps({ }, listOptionIcon: { type: String, - default: () => 'heroicons-solid:check' + default: () => $ui.selectCustom.list.option.icon.name }, listOptionIconBaseClass: { type: String, diff --git a/src/runtime/presets/default.ts b/src/runtime/presets/default.ts index b85dc42c..da3fc455 100644 --- a/src/runtime/presets/default.ts +++ b/src/runtime/presets/default.ts @@ -190,6 +190,10 @@ export default (variantColors: string[]) => { ...select, wrapper: 'relative', base: `${select.base} text-left cursor-default`, + icon: { + name: 'heroicons-solid:selector', + ...select.icon + }, list: { container: 'z-10 w-full py-1', base: 'u-bg-white shadow-lg rounded-md ring-1 u-ring-gray-200 focus:outline-none overflow-y-auto py-1 max-h-60', @@ -204,6 +208,7 @@ export default (variantColors: string[]) => { disabled: 'cursor-not-allowed opacity-50', empty: 'text-sm u-text-gray-400 px-4 py-2', icon: { + name: 'heroicons-solid:check', base: 'absolute inset-y-0 right-0 flex items-center pr-4', active: 'text-white', inactive: 'text-primary-600',