File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
components/MultiSelectCombobox
modules/workspaces/DynamicParameter Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,14 @@ import {
11
11
CommandItem ,
12
12
CommandList ,
13
13
} from "components/Command/Command" ;
14
+ import {
15
+ Tooltip ,
16
+ TooltipContent ,
17
+ TooltipProvider ,
18
+ TooltipTrigger ,
19
+ } from "components/Tooltip/Tooltip" ;
14
20
import { useDebouncedValue } from "hooks/debounce" ;
15
- import { ChevronDown , X } from "lucide-react" ;
21
+ import { ChevronDown , Info , X } from "lucide-react" ;
16
22
import {
17
23
type ComponentProps ,
18
24
type ComponentPropsWithoutRef ,
@@ -33,6 +39,7 @@ export interface Option {
33
39
label : string ;
34
40
icon ?: string ;
35
41
disable ?: boolean ;
42
+ description ?: string ;
36
43
/** fixed option that can't be removed. */
37
44
fixed ?: boolean ;
38
45
/** Group the options by providing key. */
@@ -662,6 +669,23 @@ export const MultiSelectCombobox = forwardRef<
662
669
/>
663
670
) }
664
671
{ option . label }
672
+ { option . description && (
673
+ < TooltipProvider delayDuration = { 100 } >
674
+ < Tooltip >
675
+ < TooltipTrigger asChild >
676
+ < span className = "flex items-center pointer-events-auto" >
677
+ < Info className = "!w-3.5 !h-3.5 text-content-secondary" />
678
+ </ span >
679
+ </ TooltipTrigger >
680
+ < TooltipContent
681
+ side = "right"
682
+ sideOffset = { 10 }
683
+ >
684
+ { option . description }
685
+ </ TooltipContent >
686
+ </ Tooltip >
687
+ </ TooltipProvider >
688
+ ) }
665
689
</ div >
666
690
</ CommandItem >
667
691
) ;
Original file line number Diff line number Diff line change @@ -488,6 +488,7 @@ const ParameterField: FC<ParameterFieldProps> = ({
488
488
value : opt . value . value ,
489
489
label : opt . name ,
490
490
icon : opt . icon ,
491
+ description : opt . description ,
491
492
disable : false ,
492
493
} ) ) ;
493
494
You can’t perform that action at this time.
0 commit comments