From 61fb8ff1ba4b1fd5e5300a487ae6eecdd2b8658a Mon Sep 17 00:00:00 2001 From: Andrea Leardini Date: Thu, 20 Jun 2024 16:15:38 +0200 Subject: [PATCH] feat: support options icon in NeCombobox --- src/components/NeCombobox.vue | 19 ++++++++++++++++--- src/main.ts | 1 - stories/NeCombobox.stories.ts | 24 ++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/components/NeCombobox.vue b/src/components/NeCombobox.vue index fcb17c2..7915703 100644 --- a/src/components/NeCombobox.vue +++ b/src/components/NeCombobox.vue @@ -14,7 +14,10 @@ import { ComboboxOptions } from '@headlessui/vue' import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' -import { faChevronDown as fasChevronDown } from '@fortawesome/free-solid-svg-icons' +import { + faChevronDown as fasChevronDown, + type IconDefinition +} from '@fortawesome/free-solid-svg-icons' import { faCheck as fasCheck } from '@fortawesome/free-solid-svg-icons' import { faXmark as fasXmark } from '@fortawesome/free-solid-svg-icons' import NeBadge from './NeBadge.vue' @@ -25,6 +28,7 @@ export interface NeComboboxOption { id: string label: string description?: string + icon?: IconDefinition rawObj?: any disabled?: boolean } @@ -372,10 +376,19 @@ onClickOutside(comboboxRef, () => onClickOutsideCombobox()) : 'text-gray-900 dark:text-gray-100' ]" > -
- +
+ +