From 7aaf514590075bf9438ef0786045b7a7771aaebd Mon Sep 17 00:00:00 2001 From: Miki Date: Mon, 19 Aug 2024 10:52:13 -0700 Subject: [PATCH] Adapt the newsfeed button to the updated header Also: * renamed a private variable with theme's menu button for consistency Signed-off-by: Miki --- .../public/header_user_theme_menu.tsx | 6 +- .../newsfeed_header_nav_button.scss | 14 +++++ .../components/newsfeed_header_nav_button.tsx | 62 +++++++++++++++---- src/plugins/newsfeed/public/plugin.tsx | 9 +-- 4 files changed, 72 insertions(+), 19 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 b1d6f09dafff..9830187799aa 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 ? (