Skip to content

Commit

Permalink
Tweak CSS to remove awkward line wrapping; widen select box (#1917)
Browse files Browse the repository at this point in the history
* Tweak CSS to remove awkward line wrapping; widen select box

* Use `w-64`

* Overflow with ellipsis

---------

Co-authored-by: Benjamin Leonard <[email protected]>
  • Loading branch information
charliepark and benjaminleonard authored Jan 29, 2024
1 parent 28598e1 commit ca7c85d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/pages/SiloUtilizationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function SiloUtilizationPage() {
<div className="mb-3 mt-8 flex justify-between gap-3">
<Listbox
selected={filterId}
className="w-48"
className="w-64"
aria-labelledby="filter-id-label"
name="filter-id"
items={projectItems}
Expand Down
2 changes: 1 addition & 1 deletion app/pages/project/instances/instance/tabs/MetricsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function MetricsTab() {
<>
<div className="mb-4 flex justify-between">
<Listbox
className="w-48"
className="w-64"
aria-label="Choose disk"
name="disk-name"
selected={diskName}
Expand Down
2 changes: 1 addition & 1 deletion app/pages/system/UtilizationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const MetricsTab = () => {
<div className="mb-3 mt-8 flex justify-between gap-3">
<Listbox
selected={filterId}
className="w-48"
className="w-64"
aria-labelledby="filter-id-label"
name="filter-id"
items={siloItems}
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/lib/listbox/Listbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const Listbox = <Value extends string = string>({
)}
{...props}
>
<div className="w-full px-3 text-left">
<div className="w-full overflow-hidden overflow-ellipsis whitespace-pre px-3 text-left">
{selectedItem ? (
// labelString is one line, which is what we need when label is a ReactNode
selectedItem.labelString || selectedItem.label
Expand Down

0 comments on commit ca7c85d

Please sign in to comment.