File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
packages/compass-assistant/src Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 11import React , { useCallback , useContext } from 'react' ;
22import {
3+ Badge ,
4+ css ,
35 DrawerSection ,
46 Icon ,
57 IconButton ,
68 showConfirmation ,
9+ spacing ,
710} from '@mongodb-js/compass-components' ;
811import { AssistantChat } from './assistant-chat' ;
912import {
@@ -13,6 +16,16 @@ import {
1316} from './compass-assistant-provider' ;
1417import { usePreference } from 'compass-preferences-model/provider' ;
1518
19+ const assistantTitleStyles = css ( {
20+ display : 'flex' ,
21+ alignItems : 'center' ,
22+ justifyContent : 'space-between' ,
23+ } ) ;
24+
25+ const assistantTitleTextStyles = css ( {
26+ marginRight : spacing [ 200 ] ,
27+ } ) ;
28+
1629/**
1730 * CompassAssistantDrawer component that wraps AssistantChat in a DrawerSection.
1831 * This component can be placed at any level in the component tree as long as
@@ -53,14 +66,11 @@ export const CompassAssistantDrawer: React.FunctionComponent<{
5366 < DrawerSection
5467 id = { ASSISTANT_DRAWER_ID }
5568 title = {
56- < div
57- style = { {
58- display : 'flex' ,
59- alignItems : 'center' ,
60- justifyContent : 'space-between' ,
61- } }
62- >
63- < span > MongoDB Assistant</ span >
69+ < div className = { assistantTitleStyles } >
70+ < div >
71+ < span className = { assistantTitleTextStyles } > MongoDB Assistant</ span >
72+ < Badge variant = "blue" > Preview</ Badge >
73+ </ div >
6474 < IconButton
6575 aria-label = "Clear chat"
6676 onClick = { ( ) => {
You can’t perform that action at this time.
0 commit comments