@@ -8,20 +8,21 @@ import {
8
8
CommandList ,
9
9
CommandSeparator ,
10
10
} from "@/components/ui/command" ;
11
+ import Kbd from "@/components/ui/kbd" ;
11
12
import {
12
13
Popover ,
13
14
PopoverContent ,
14
15
PopoverTrigger ,
15
16
} from "@/components/ui/popover" ;
16
17
import { cn } from "@/lib/utils" ;
18
+ import { RiCheckFill as CheckIcon } from "@remixicon/react" ;
17
19
import type React from "react" ;
18
20
import { useEffect , useRef , useState } from "react" ;
19
- import { CheckIcon , type IconProps } from "./icons" ;
20
21
21
22
export type ComboBoxOption = {
22
23
value : string ;
23
24
label : string ;
24
- icon ?: React . FC < IconProps > ;
25
+ icon ?: React . FC < { className : string } > ;
25
26
} ;
26
27
27
28
export const LinearCombobox = ( {
@@ -41,7 +42,6 @@ export const LinearCombobox = ({
41
42
) ;
42
43
const [ searchValue , setSearchValue ] = useState ( "" ) ;
43
44
const onValueChangeRef = useRef ( onValueChange ) ;
44
- const isSearching = searchValue . length > 0 ;
45
45
46
46
useEffect ( ( ) => {
47
47
if ( selectedOption && onValueChangeRef . current ) {
@@ -56,7 +56,7 @@ export const LinearCombobox = ({
56
56
aria-label = "Select option"
57
57
variant = "outline"
58
58
size = "lg"
59
- className = "w-full px-3 h-10 text-[0.8125rem] leading-normal font-medium text-primary"
59
+ className = "w-full px-3 h-10 text-[0.8125rem] leading-normal font-medium text-primary text-left items-center justify-start "
60
60
>
61
61
{ selectedOption ? (
62
62
< >
@@ -98,7 +98,7 @@ export const LinearCombobox = ({
98
98
setSearchValue ( value ) ;
99
99
} }
100
100
className = "text-[0.8125rem] leading-normal"
101
- placeholder = "Type Option no "
101
+ placeholder = "Search or type option # "
102
102
/>
103
103
104
104
< CommandList >
@@ -117,7 +117,9 @@ export const LinearCombobox = ({
117
117
className = "group rounded-md flex justify-between items-center w-full text-[0.8125rem] leading-normal text-primary"
118
118
>
119
119
< div className = "flex items-center gap-x-2" >
120
- < div className = "min-w-3 text-center" > { index } </ div >
120
+ < div className = "min-w-3 text-center" >
121
+ < Kbd className = "mr-3" > { index } </ Kbd >
122
+ </ div >
121
123
< div className = "flex items-center" >
122
124
{ option . icon && (
123
125
< option . icon className = "mr-2 size-4 fill-muted-foreground group-hover:fill-primary" />
0 commit comments