Skip to content

Commit

Permalink
fixed an issue where in some instances icon/avatar could shrink in a …
Browse files Browse the repository at this point in the history
…listbox/menu
  • Loading branch information
fraincs committed Nov 20, 2024
1 parent e4ba1bc commit 2bab529
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-peaches-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@orbit-ui/transition-components": patch
---

Prevent listbox and menu icon/avatar from shrinking
2 changes: 2 additions & 0 deletions packages/components/src/listbox/src/Listbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ IMPORTANT: The Listbox component hardcoded a few CSS values to enable dynamic sc
.o-ui-listbox-option svg.o-ui-listbox-option-end-icon:not(.o-ui-listbox-option-checkmark) {
width: var(--o-ui-listbox-option-icon-size);
height: var(--o-ui-listbox-option-icon-size);
flex-shrink: 0;
}

/* OPTION | ICONS | START ICON */
Expand Down Expand Up @@ -130,6 +131,7 @@ IMPORTANT: The Listbox component hardcoded a few CSS values to enable dynamic sc
/* AVATAR */
.o-ui-listbox-option-avatar {
margin-right: var(--hop-space-inline-sm);
flex-shrink: 0;
grid-area: aside;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/menu/src/Menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ IMPORTANT: The Menu component hardcoded a few CSS values to enable dynamic scrol
.o-ui-menu-item svg.o-ui-menu-item-end-icon:not(.o-ui-menu-item-checkmark) {
width: var(--o-ui-menu-item-icon-size);
height: var(--o-ui-menu-item-icon-size);
flex-shrink: 0;
}

/* ITEM | ICON | START */
Expand Down Expand Up @@ -194,6 +195,7 @@ IMPORTANT: The Menu component hardcoded a few CSS values to enable dynamic scrol
.o-ui-menu-item-option-avatar {
margin-right: var(--hop-space-inline-sm);
grid-area: aside;
flex-shrink: 0;
align-self: center;
}

Expand Down

0 comments on commit 2bab529

Please sign in to comment.