Skip to content

Commit d1d8a28

Browse files
committed
fix(Item): allow shrinking * 2
1 parent 07a1b8d commit d1d8a28

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/gorgeous-apples-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Allow flex shrinking for Item.

src/components/content/Item/Item.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ const ItemElement = tasty({
216216
'': 'auto auto',
217217
'with-description-block': 'auto auto auto',
218218
},
219+
// Prevent items from shrinking inside vertical flex layouts (Menu, ListBox, etc)
220+
flexShrink: {
221+
'': 'initial',
222+
'menuitem | listboxitem': 0,
223+
},
219224
position: 'relative',
220225
padding: 0,
221226
margin: 0,

0 commit comments

Comments
 (0)