Skip to content

Commit 5b3e949

Browse files
committed
feat: update the option positioning
1 parent f6f6c00 commit 5b3e949

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/components/ui/combobox.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,20 @@ export const LinearCombobox = ({
116116
}}
117117
className="group rounded-md flex justify-between items-center w-full text-[0.8125rem] leading-normal text-primary"
118118
>
119-
<div className="flex items-center">
120-
{option.icon && (
121-
<option.icon className="mr-2 size-4 fill-muted-foreground group-hover:fill-primary" />
122-
)}
123-
<span>{option.label}</span>
119+
<div className="flex items-center gap-x-2">
120+
<div className="min-w-3 text-center">{index}</div>
121+
<div className="flex items-center">
122+
{option.icon && (
123+
<option.icon className="mr-2 size-4 fill-muted-foreground group-hover:fill-primary" />
124+
)}
125+
<span>{option.label}</span>
126+
</div>
124127
</div>
125-
<div className="flex items-center">
128+
129+
<div>
126130
{selectedOption?.value === option.value && (
127131
<CheckIcon className="mr-3 size-4 fill-muted-foreground group-hover:fill-primary" />
128132
)}
129-
{!isSearching && <span className="text-xs">{index}</span>}
130133
</div>
131134
</CommandItem>
132135
))}

0 commit comments

Comments
 (0)