Skip to content

Commit

Permalink
feat(Label): add a disabled state to submenu button (#1867)
Browse files Browse the repository at this point in the history
  • Loading branch information
talkor authored Jan 4, 2024
1 parent 63e3f8a commit ecb20c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/components/Menu/MenuItem/MenuItem.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,20 @@
.subMenuIconWrapper .splitMenuItemIconButton {
width: 34px;
height: 30px;
--primary-background-hover-color: rgba(103, 104, 121, 0.1); // TODO Temp override for Tal changes - remove once token is changed
--primary-selected-color: rgba(103, 104, 121, 0.1); // Override for IconButton active color

// TODO Temp override for Tal changes - remove once token is changed
--primary-background-hover-color: rgba(103, 104, 121, 0.1);
// Override for IconButton active color
--primary-selected-color: rgba(103, 104, 121, 0.1);
}

.iconButton {
width: 18px;
height: 18px;
color: var(--icon-color);

&:not(.disabled) {
color: var(--icon-color);
}
}

.item.splitMenuItem {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Menu/MenuItem/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ const MenuItem: VibeComponent<MenuItemProps> & {
className={styles.splitMenuItemIconButton}
kind={IconButton.kinds.TERTIARY}
size={null} // Customizing size via className
iconClassName={styles.iconButton}
iconClassName={cx(styles.iconButton, { [styles.disabled]: disabled })}
tabIndex={-1}
ref={iconButtonElementRef}
active={shouldShowSubMenu}
disabled={disabled}
/>
</div>
) : (
Expand Down

0 comments on commit ecb20c8

Please sign in to comment.