forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds conversation selector, custom localstorage keys, and UI cleanup
- Loading branch information
Showing
8 changed files
with
573 additions
and
463 deletions.
There are no files selected for viewing
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
46 changes: 46 additions & 0 deletions
46
...k/plugins/security_solution/public/security_assistant/assistant_overlay/quick_prompts.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,46 @@ | ||
/* | ||
* 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 from 'react'; | ||
import { EuiFlexGroup, EuiFlexItem, EuiBadge } from '@elastic/eui'; | ||
import styled from 'styled-components'; | ||
|
||
const QuickPromptsFlexGroup = styled(EuiFlexGroup)` | ||
margin: 16px; | ||
`; | ||
|
||
type QuickPrompt = { | ||
text: string; | ||
color: string; | ||
}; | ||
const quickPrompts: QuickPrompt[] = [ | ||
{ text: 'Alert Summarization', color: 'accent' }, | ||
{ text: 'Rule Creation', color: 'success' }, | ||
{ text: 'Workflow Analysis', color: 'primary' }, | ||
{ text: 'Threat Investigation Guides', color: 'warning' }, | ||
]; | ||
interface QuickPromptsProps { | ||
setInput: (input: string) => void; | ||
} | ||
export const QuickPrompts: React.FC<QuickPromptsProps> = React.memo(({ setInput }) => { | ||
return ( | ||
<QuickPromptsFlexGroup gutterSize="s" alignItems="center"> | ||
{quickPrompts.map((badge, index) => ( | ||
<EuiFlexItem key={index} grow={false}> | ||
<EuiBadge | ||
color={badge.color} | ||
onClick={() => setInput(badge.text)} | ||
onClickAriaLabel={badge.text} | ||
> | ||
{badge.text} | ||
</EuiBadge> | ||
</EuiFlexItem> | ||
))} | ||
</QuickPromptsFlexGroup> | ||
); | ||
}); | ||
QuickPrompts.displayName = 'QuickPrompts'; |
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.