visual improvements

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-07 23:44:22 +01:00
parent 69efb0dafa
commit 04453c673f
7 changed files with 23 additions and 10 deletions

View File

@@ -75,10 +75,12 @@ export function Combobox<T extends string>({
aria-expanded={open}
className={cn('justify-between', className)}
>
{Icon ? <Icon className="mr-2" size={16} /> : null}
<span className="overflow-hidden text-ellipsis whitespace-nowrap">
{value ? find(value)?.label ?? 'No match' : placeholder}
</span>
<div className="flex min-w-0 gap-2 items-center">
{Icon ? <Icon className="mr-2" size={16} /> : null}
<span className="overflow-hidden text-ellipsis whitespace-nowrap">
{value ? find(value)?.label ?? 'No match' : placeholder}
</span>
</div>
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
</Button>
)}