diff --git a/x-pack/plugins/session_view/public/components/ProcessTreeNode/index.tsx b/x-pack/plugins/session_view/public/components/ProcessTreeNode/index.tsx index 097dcd58b967..2ddc800ee5e5 100644 --- a/x-pack/plugins/session_view/public/components/ProcessTreeNode/index.tsx +++ b/x-pack/plugins/session_view/public/components/ProcessTreeNode/index.tsx @@ -15,7 +15,7 @@ import React, { useMemo, useRef, useLayoutEffect, useState, useEffect, MouseEven import { EuiButton, EuiIcon } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { Process } from '../../hooks/use_process_tree'; -import { useStyles } from './styles'; +import { useStyles, ButtonType } from './styles'; import { ProcessTreeAlerts } from '../ProcessTreeAlerts'; interface ProcessDeps { @@ -119,7 +119,7 @@ export function ProcessTreeNode({ if (!isSessionLeader && process.children.length > 0) { buttons.push( setChildrenExpanded(!childrenExpanded)} > setAlertsExpanded(!alertsExpanded)} > @@ -202,7 +202,7 @@ export function ProcessTreeNode({ if (user.name === 'root' && user.id !== parent.user.id) { return ( - + { const { euiTheme } = useEuiTheme(); const cached = useMemo(() => { const { colors, border, font, size } = euiTheme; - enum ButtonType { - children = 'children', - alerts = 'alerts', - output = 'output', - userChanged = 'user', - } - const darkText: CSSObject = { color: colors.text, }; - const searchHighlight = ` - background-color: ${colors.highlight}; - color: ${colors.text}; - border-radius: ${border.radius.medium}; - `; + const searchHighlight: CSSObject = { + backgroundColor: colors.highlight, + color: colors.text, + borderRadius: border.radius.medium, + }; const children: CSSObject = { position: 'relative', @@ -73,7 +73,7 @@ export const useStyles = ({ depth, hasAlerts }: StylesDeps) => { marginLeft: size.s, }; - const getButtonStyle = (type: string) => { + const getButtonStyle = (type: string): CSSObject => { let background = 'rgba(170, 101, 86, 0.04)'; let borderStyle = '1px solid rgba(170, 101, 86, 0.48)'; @@ -175,7 +175,6 @@ export const useStyles = ({ depth, hasAlerts }: StylesDeps) => { workingDir, userEnteredIcon, buttonArrow, - ButtonType, getButtonStyle, alertDetails, };