From a73443ce1824079423cace0a422de5ff0e157ca7 Mon Sep 17 00:00:00 2001 From: Robert Austin Date: Thu, 17 Sep 2020 14:31:04 -0400 Subject: [PATCH] [Resolver] Fixup assets file (#77766) (#77786) * Fix useUiSetting import * remove unused exports --- .../security_solution/public/resolver/view/assets.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/security_solution/public/resolver/view/assets.tsx b/x-pack/plugins/security_solution/public/resolver/view/assets.tsx index a066eb9421fc1..e7c3a87c9c0f6 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/assets.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/assets.tsx @@ -12,9 +12,8 @@ import euiThemeAmsterdamLight from '@elastic/eui/dist/eui_theme_amsterdam_light. import { htmlIdGenerator, ButtonColor } from '@elastic/eui'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; -import { useUiSetting } from '../../common/lib/kibana'; -import { DEFAULT_DARK_MODE as defaultDarkMode } from '../../../common/constants'; import { ResolverProcessType } from '../types'; +import { useUiSetting } from '../../../../../../src/plugins/kibana_react/public'; type ResolverColorNames = | 'descriptionText' @@ -38,7 +37,7 @@ interface NodeStyleConfig { strokeColor: string; } -export interface NodeStyleMap { +interface NodeStyleMap { runningProcessCube: NodeStyleConfig; runningTriggerCube: NodeStyleConfig; terminatedProcessCube: NodeStyleConfig; @@ -50,7 +49,7 @@ const idGenerator = htmlIdGenerator(); /** * Ids of paint servers to be referenced by fill and stroke attributes */ -export const PaintServerIds = { +const PaintServerIds = { runningProcessCube: idGenerator('psRunningProcessCube'), runningTriggerCube: idGenerator('psRunningTriggerCube'), terminatedProcessCube: idGenerator('psTerminatedProcessCube'), @@ -385,7 +384,7 @@ const SymbolsAndShapes = memo(({ isDarkMode }: { isDarkMode: boolean }) => ( * 3. `` elements can be handled by compositor (faster) */ const SymbolDefinitionsComponent = memo(({ className }: { className?: string }) => { - const isDarkMode = useUiSetting(defaultDarkMode); + const isDarkMode = useUiSetting('theme:darkMode'); return ( @@ -421,7 +420,7 @@ export const useResolverTheme = (): { nodeAssets: NodeStyleMap; cubeAssetsForNode: (isProcessTerimnated: boolean, isProcessTrigger: boolean) => NodeStyleConfig; } => { - const isDarkMode = useUiSetting(defaultDarkMode); + const isDarkMode = useUiSetting('theme:darkMode'); const theme = isDarkMode ? euiThemeAmsterdamDark : euiThemeAmsterdamLight; const getThemedOption = (lightOption: string, darkOption: string): string => {