Skip to content

Commit 8060c2f

Browse files
authored
HUB-11487: Fix layout of MenuItem component by adjusting flex properties (#76)
* HUB-11487: Fix layout of MenuItem component by adjusting flex properties HUB-11487 (Fix menu item height) * HUB-11487: Fix styles HUB-11487 (Fix menu item height)
1 parent 4a7d564 commit 8060c2f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/cruel-pianos-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@knime/components": patch
3+
---
4+
5+
Fix layout of MenuItem component by adjusting flex properties

demo/src/components/MenuItems.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const menuItemsData: MenuItem[] = [
112112
layout: "horizontal",
113113
style: {
114114
"margin-right": "8px",
115+
"--avatar-size": "16px",
115116
},
116117
}),
117118
badgeText: "Team",

packages/components/src/components/base/MenuItem/BaseMenuItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ const dynamicAttributes = (item: MenuItem) => {
153153
& .label {
154154
display: flex;
155155
flex-direction: column;
156-
align-content: flex-start;
156+
justify-content: center;
157157
width: 100%;
158158
159159
& .text-and-hotkey {
160160
display: flex;
161161
align-items: center;
162162
width: 100%;
163-
height: 100%;
163+
height: calc(var(--icon-size) * 1px);
164164
text-align: left;
165165
166166
& .checkbox {

0 commit comments

Comments
 (0)