fix(menu): refactor menu system to use pure config objects and fix submenu click events
This commit is contained in:
83
src/components/menu/index.css
Normal file
83
src/components/menu/index.css
Normal file
@@ -0,0 +1,83 @@
|
||||
.bim-menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--bim-ui_bg_color, #2b2d30);
|
||||
border-radius: 4px;
|
||||
padding: 4px 0;
|
||||
min-width: 160px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
user-select: none;
|
||||
color: var(--bim-ui_text_primary, #ffffff);
|
||||
}
|
||||
|
||||
.bim-menu-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.bim-menu-divider {
|
||||
height: 1px;
|
||||
background-color: var(--bim-ui_border_color, #3e4145);
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.bim-menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
color: var(--bim-ui_text_primary, #ffffff);
|
||||
}
|
||||
|
||||
.bim-menu-item:hover {
|
||||
background-color: var(--bim-ui_bg_hover, #3e4145);
|
||||
}
|
||||
|
||||
.bim-menu-item.disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bim-menu-item-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.bim-menu-item-icon svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.bim-menu-item-label {
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.bim-menu-item-arrow {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.bim-menu-item-arrow svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
fill: currentColor;
|
||||
}
|
||||
Reference in New Issue
Block a user