Skip to content

Commit

Permalink
chore(icon): Remove clickable prop and set icons as decorative by def…
Browse files Browse the repository at this point in the history
…ault
  • Loading branch information
rivka-ungar committed Jun 23, 2024
1 parent c00f51e commit 04bfb00
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions packages/core/src/components/Menu/MenuItem/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ const MenuItem: VibeComponent<MenuItemProps | MenuItemTitleComponentProps> & {
onMouseLeave,
shouldScrollMenu,
"data-testid": dataTestId,
"aria-label": ariaLabel,
splitMenuItem = false
},
ref: ForwardedRef<HTMLElement>
Expand Down Expand Up @@ -229,8 +228,6 @@ const MenuItem: VibeComponent<MenuItemProps | MenuItemTitleComponentProps> & {
[setSubMenuIsOpenByIndex, index, closeMenu]
);

// if "title" is a component ariaLabel is mandatory
const iconLabel = ariaLabel ?? (title as string);
const renderSubMenuIconIfNeeded = () => {
if (!hasChildren) return null;

Expand All @@ -251,14 +248,7 @@ const MenuItem: VibeComponent<MenuItemProps | MenuItemTitleComponentProps> & {
</div>
) : (
<div className={styles.subMenuIconWrapper}>
<Icon
clickable={false}
icon={DropdownChevronRight}
iconLabel={iconLabel}
className={styles.subMenuIcon}
ignoreFocusStyle
iconSize={18}
/>
<Icon icon={DropdownChevronRight} className={styles.subMenuIcon} ignoreFocusStyle iconSize={18} />
</div>
);
};
Expand Down Expand Up @@ -288,9 +278,7 @@ const MenuItem: VibeComponent<MenuItemProps | MenuItemTitleComponentProps> & {
<div className={cx(styles.iconWrapper, iconWrapperClassName)} style={iconWrapperStyle}>
<Icon
iconType={finalIconType}
clickable={false}
icon={icon}
iconLabel={iconLabel}
className={styles.icon}
ignoreFocusStyle
style={iconStyle}
Expand Down

0 comments on commit 04bfb00

Please sign in to comment.