Skip to content

Commit 39c42f0

Browse files
committed
Add constant
1 parent a3bdebf commit 39c42f0

File tree

1 file changed

+3
-2
lines changed
  • x-pack/plugins/security_solution/public/timelines/components/timeline/body

1 file changed

+3
-2
lines changed

x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ interface OwnProps {
3838
onRuleChange?: () => void;
3939
}
4040

41+
const NUM_OF_ICON_IN_TIMELINE_ROW = 2;
42+
4143
export const hasAdditionalActions = (id: TimelineId): boolean =>
4244
[TimelineId.detectionsPage, TimelineId.detectionsRulesDetailsPage, TimelineId.active].includes(
4345
id
@@ -128,8 +130,7 @@ export const BodyComponent = React.memo<StatefulBodyProps>(
128130
isEventViewer,
129131
showCheckboxes,
130132
hasAdditionalActions(id as TimelineId)
131-
? // The extra one is for cases timeline action
132-
DEFAULT_ICON_BUTTON_WIDTH * 2 + EXTRA_WIDTH
133+
? DEFAULT_ICON_BUTTON_WIDTH * NUM_OF_ICON_IN_TIMELINE_ROW + EXTRA_WIDTH
133134
: 0
134135
),
135136
[isEventViewer, showCheckboxes, id]

0 commit comments

Comments
 (0)