-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Fix UX for Success banner for Host Isolation (#10…
- Loading branch information
Showing
8 changed files
with
161 additions
and
130 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...tion/public/common/components/endpoint/host_isolation/action_completion_return_button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React, { useCallback } from 'react'; | ||
import { EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty, EuiText } from '@elastic/eui'; | ||
|
||
export const ActionCompletionReturnButton = React.memo( | ||
({ onClick, buttonText }: { onClick: () => void; buttonText: string }) => { | ||
const onClickCallback = useCallback(() => onClick(), [onClick]); | ||
|
||
return ( | ||
<> | ||
<EuiSpacer size="m" /> | ||
<EuiFlexGroup gutterSize="none" justifyContent="flexEnd"> | ||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty | ||
flush="right" | ||
onClick={onClickCallback} | ||
data-test-subj="hostIsolateSuccessCompleteButton" | ||
> | ||
<EuiText size="s"> | ||
<p>{buttonText}</p> | ||
</EuiText> | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</> | ||
); | ||
} | ||
); | ||
|
||
ActionCompletionReturnButton.displayName = 'ActionCompletionReturnButton'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.