Skip to content

Commit

Permalink
[Security Solution] [Endpoint] Display backbutton for artifact empty …
Browse files Browse the repository at this point in the history
…states (#122238) (#122258)

* Display backbutton for empty states

* Remove eui spacer when empty state

Co-authored-by: David Sánchez <[email protected]>
  • Loading branch information
kibanamachine and dasansol92 authored Jan 4, 2022
1 parent e6ee7b2 commit dfa5575
Showing 1 changed file with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ export const AdministrationListPage: FC<AdministrationListPageProps & CommonProp

const getTestId = useTestIdGenerator(otherProps['data-test-subj']);

return (
<div {...otherProps}>
{!hideHeader && (
const pageHeader = useMemo(
() =>
hideHeader ? (
<EuiFlexGroup direction="column" gutterSize="none" alignItems="flexStart">
<EuiFlexItem grow={false}>
{headerBackComponent && <>{headerBackComponent}</>}
</EuiFlexItem>
</EuiFlexGroup>
) : (
<>
<EuiPageHeader
pageTitle={header}
Expand All @@ -77,7 +83,22 @@ export const AdministrationListPage: FC<AdministrationListPageProps & CommonProp
/>
<EuiSpacer size="l" />
</>
)}
),
[
actions,
description,
getTestId,
hasBottomBorder,
header,
headerBackComponent,
hideHeader,
restrictWidth,
]
);

return (
<div {...otherProps}>
{pageHeader}

<EuiPageContent
hasBorder={false}
Expand Down

0 comments on commit dfa5575

Please sign in to comment.