Skip to content

Commit 18fe5cd

Browse files
authored
fix(Item): allow shrinking (#855)
1 parent e0947b5 commit 18fe5cd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ const ItemElement = tasty({
217217
'with-description-block': 'auto auto auto',
218218
},
219219
// Prevent items from shrinking inside vertical flex layouts (Menu, ListBox, etc)
220-
flexShrink: 0,
220+
flexShrink: {
221+
'': 'initial',
222+
'menuitem | listboxitem': 0,
223+
},
221224
position: 'relative',
222225
padding: 0,
223226
margin: 0,

0 commit comments

Comments
 (0)