From 5ca4e67955eb60b05cafc21549fe7e853a8acdf8 Mon Sep 17 00:00:00 2001 From: MadanKumarGovindaswamy Date: Mon, 6 May 2024 11:20:13 +0530 Subject: [PATCH] update: selected color --- .../src/MenuItem.module.scss | 22 ++---------------- .../src/NavigationSideMenu.jsx | 4 ++-- .../src/NavigationSideMenu.module.scss | 2 ++ .../src/_MenuItem.jsx | 2 +- .../NavigationSideMenuItem.module.scss | 14 +++-------- .../NavigationSideMenuItem.module.scss | 14 +++-------- .../first_menu_item_focused.png | Bin 12759 -> 12749 bytes ...irst_menu_item_focused_with_left_arrow.png | Bin 12886 -> 12749 bytes .../hover_navigation_side_menu_display.png | Bin 9672 -> 9669 bytes .../navigation_side_menu_display.png | Bin 9656 -> 9653 bytes ...igation_side_menu_display_with_toolbar.png | Bin 11177 -> 11173 bytes .../second_menu_item_focused.png | Bin 12895 -> 12741 bytes .../selected_navigation_side_menu_display.png | Bin 12029 -> 11826 bytes ...ubmenu_header_focused_with_right_arrow.png | Bin 13598 -> 13590 bytes ...irst_menu_item_focused_with_left_arrow.png | Bin 11022 -> 10825 bytes .../second_menu_item_focused.png | Bin 11044 -> 10826 bytes .../selected_navigation_side_menu_display.png | Bin 10565 -> 10389 bytes ...irst_menu_item_focused_with_left_arrow.png | Bin 13014 -> 12912 bytes .../second_menu_item_focused.png | Bin 13036 -> 12925 bytes .../selected_navigation_side_menu_display.png | Bin 12169 -> 11967 bytes 20 files changed, 13 insertions(+), 45 deletions(-) diff --git a/packages/terra-navigation-side-menu/src/MenuItem.module.scss b/packages/terra-navigation-side-menu/src/MenuItem.module.scss index 161a09f4c8f..d4f3134a95f 100644 --- a/packages/terra-navigation-side-menu/src/MenuItem.module.scss +++ b/packages/terra-navigation-side-menu/src/MenuItem.module.scss @@ -86,25 +86,7 @@ } &.is-selected { - background-attachment: var(--terra-navigation-side-menu-item-selected-background-attachment); - background-color: var(--terra-navigation-side-menu-item-selected-background-color, #f4f4f4); - background-image: var(--terra-navigation-side-menu-item-selected-background-image); - background-size: var(--terra-navigation-side-menu-item-selected-background-size); - border-left: var(--terra-navigation-side-menu-item-selected-border-left, 0.5rem solid #007cc3); - color: var(--terra-navigation-side-menu-item-selected-color); - font-weight: var(--terra-navigation-side-menu-item-selected-font-weight, 600); - padding-left: var(--terra-navigation-side-menu-item-selected-padding-left, 0.7143rem); - - &::before { - background-image: var(--terra-navigation-side-menu-item-selected-before-background-image); - content: ''; - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; - z-index: -1; - } + background-color: var(--terra-navigation-side-menu-item-selected-background-color, darken(#ebf6fd, 2%)); .chevron { color: var(--terra-navigation-side-menu-item-selected-chevron-color, #909496); @@ -112,7 +94,7 @@ &:hover, &.is-hovered { - background-color: var(--terra-navigation-side-menu-item-selected-hover-background-color, #f4f4f4); + background-color: var(--terra-navigation-side-menu-item-selected-hover-background-color, darken(#ebf6fd, 2%)); color: var(--terra-navigation-side-menu-item-selected-hover-color); /* stylelint-disable-next-line max-nesting-depth */ diff --git a/packages/terra-navigation-side-menu/src/NavigationSideMenu.jsx b/packages/terra-navigation-side-menu/src/NavigationSideMenu.jsx index 1aab372f2c1..1ef141fd9fa 100644 --- a/packages/terra-navigation-side-menu/src/NavigationSideMenu.jsx +++ b/packages/terra-navigation-side-menu/src/NavigationSideMenu.jsx @@ -365,7 +365,7 @@ class NavigationSideMenu extends Component { } let header; - if (this.onBack || !currentItem.isRootMenu) { + if (this.onBack || (currentItem && !currentItem.isRootMenu)) { header = (
  • - +