From 360fcb5bcc441a3396698f896ff4b1cdd4084aca Mon Sep 17 00:00:00 2001 From: Angela Chuang <6295984+angorayc@users.noreply.github.com> Date: Mon, 30 Dec 2024 16:14:17 +0000 Subject: [PATCH] [Security Solution][Entity Analytics] EUI refresh: Remove color functions (#205262) ## Summary https://github.com/elastic/kibana/issues/202505 https://github.com/elastic/kibana/pull/204921 ### Running Kibana with the Borealis theme In order to run Kibana with Borealis, you'll need to do the following: Set the following in kibana.dev.yml: uiSettings.experimental.themeSwitcherEnabled: true Run Kibana with the following environment variable set: KBN_OPTIMIZER_THEMES="borealislight,borealisdark,v8light,v8dark" yarn start This will expose a toggle under Stack Management > Advanced Settings > Theme version, which you can use to toggle between Amsterdam and Borealis. ![Image](https://github.com/user-attachments/assets/78d64946-43fc-4400-bbb1-229d900b7f05) --- .../shared/components/left_panel/left_panel_content.tsx | 5 +++-- .../shared/components/left_panel/left_panel_header.tsx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_content.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_content.tsx index 5a66a5b305611..33806a604bc11 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_content.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_content.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { useEuiBackgroundColor } from '@elastic/eui'; +import { useEuiTheme } from '@elastic/eui'; import type { VFC } from 'react'; import React, { useMemo } from 'react'; import { css } from '@emotion/react'; @@ -22,6 +22,7 @@ export interface PanelContentProps { * Appears after the user clicks on the expand details button in the right section. */ export const LeftPanelContent: VFC = ({ selectedTabId, tabs }) => { + const { euiTheme } = useEuiTheme(); const selectedTabContent = useMemo(() => { return tabs.find((tab) => tab.id === selectedTabId)?.content; }, [selectedTabId, tabs]); @@ -29,7 +30,7 @@ export const LeftPanelContent: VFC = ({ selectedTabId, tabs } return ( {selectedTabContent} diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_header.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_header.tsx index 2d7fc23115eb7..3c4e1b9da65bc 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_header.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/shared/components/left_panel/left_panel_header.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiTab, EuiTabs, useEuiBackgroundColor } from '@elastic/eui'; +import { EuiTab, EuiTabs, useEuiTheme } from '@elastic/eui'; import type { ReactElement, VFC } from 'react'; import React, { memo } from 'react'; import { css } from '@emotion/react'; @@ -57,6 +57,7 @@ export interface PanelHeaderProps { */ export const LeftPanelHeader: VFC = memo( ({ selectedTabId, setSelectedTabId, tabs }) => { + const { euiTheme } = useEuiTheme(); const onSelectedTabChanged = (id: EntityDetailsLeftPanelTab) => setSelectedTabId(id); const renderTabs = tabs.map((tab, index) => ( = memo( return (