Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Select button main content grow #1767

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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