-
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.
[Obs AI Assistant] Conversation sharing route and other related permi…
…ssion handling (#206590)
- Loading branch information
Showing
12 changed files
with
434 additions
and
110 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
x-pack/platform/packages/shared/kbn-ai-assistant/src/chat/chat_banner.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,57 @@ | ||
/* | ||
* 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, { ReactNode } from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { css } from '@emotion/css'; | ||
import { EuiText, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiPanel, useEuiTheme } from '@elastic/eui'; | ||
|
||
export function ChatBanner({ | ||
title, | ||
description, | ||
button = null, | ||
}: { | ||
title: string; | ||
description: string; | ||
button?: ReactNode; | ||
}) { | ||
const { euiTheme } = useEuiTheme(); | ||
|
||
return ( | ||
<EuiPanel | ||
paddingSize="m" | ||
hasShadow={false} | ||
color="subdued" | ||
borderRadius="m" | ||
grow={false} | ||
className={css` | ||
margin: ${euiTheme.size.m}; | ||
`} | ||
> | ||
<EuiFlexGroup> | ||
<EuiFlexItem grow={false}> | ||
<EuiIcon size="l" type="users" /> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow> | ||
<EuiText size="xs"> | ||
<h3> | ||
{i18n.translate('xpack.aiAssistant.shareBanner.title', { | ||
defaultMessage: title, | ||
})} | ||
</h3> | ||
<p> | ||
{i18n.translate('xpack.aiAssistant.shareBanner.description', { | ||
defaultMessage: description, | ||
})} | ||
</p> | ||
{button} | ||
</EuiText> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiPanel> | ||
); | ||
} |
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.