From 77a53e6430a0f4e4eea11feebb160ce6aa64a5d5 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 00:29:19 -0700 Subject: [PATCH] Adapt the newsfeed button to the updated header (#7774) (#7794) Also: * renamed a private variable with theme's menu button for consistency (cherry picked from commit ba5fe502a2fa93b91d2a1c6d31e337ea7d28610b) Signed-off-by: Miki Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../public/header_user_theme_menu.tsx | 6 +- .../newsfeed_header_nav_button.scss | 14 +++++ .../components/newsfeed_header_nav_button.tsx | 60 +++++++++++++++---- src/plugins/newsfeed/public/plugin.tsx | 9 +-- 4 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 src/plugins/newsfeed/public/components/newsfeed_header_nav_button.scss diff --git a/src/plugins/advanced_settings/public/header_user_theme_menu.tsx b/src/plugins/advanced_settings/public/header_user_theme_menu.tsx index 86a78cbcc2d2..dbad6bd5b5a6 100644 --- a/src/plugins/advanced_settings/public/header_user_theme_menu.tsx +++ b/src/plugins/advanced_settings/public/header_user_theme_menu.tsx @@ -66,7 +66,7 @@ export const HeaderUserThemeMenu = () => { : screenModeOptions[0].value ); - const legacyAppearance = !uiSettings.get('home:useNewHomePage'); + const useLegacyAppearance = !uiSettings.get('home:useNewHomePage'); const onButtonClick = () => { setPopover(!isPopoverOpen); @@ -105,7 +105,7 @@ export const HeaderUserThemeMenu = () => { setPopover(false); }; - const innerButton = legacyAppearance ? ( + const innerButton = useLegacyAppearance ? (