Skip to content

Commit

Permalink
Make Select button main content grow
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Nov 5, 2024
1 parent cd5a1f9 commit 986c9d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/input/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ function SelectMain<T>({
'focus-visible-ring transition-colors whitespace-nowrap',
'w-full flex items-center justify-between gap-x-2 p-2',
'bg-grey-0 disabled:bg-grey-1 disabled:text-grey-6',
// Buttons are center-aligned by default. Overwrite it.
'text-left',
// Add inherited rounded corners so that the toggle is consistent with
// the wrapper, which is the element rendering borders.
// Using overflow-hidden in the parent is not an option here, because
Expand All @@ -586,7 +588,7 @@ function SelectMain<T>({
}}
data-testid="select-toggle-button"
>
<div className="truncate">{buttonContent}</div>
<div className="truncate grow">{buttonContent}</div>
<div className="text-grey-6">
{listboxOpen ? <MenuCollapseIcon /> : <MenuExpandIcon />}
</div>
Expand Down

0 comments on commit 986c9d5

Please sign in to comment.