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
@@ -54,14 +67,11 @@ export const CompassAssistantDrawer: React.FunctionComponent<{
5467 < DrawerSection
5568 id = { ASSISTANT_DRAWER_ID }
5669 title = {
57- < div
58- style = { {
59- display : 'flex' ,
60- alignItems : 'center' ,
61- justifyContent : 'space-between' ,
62- } }
63- >
64- < span > MongoDB Assistant</ span >
70+ < div className = { assistantTitleStyles } >
71+ < div >
72+ < span className = { assistantTitleTextStyles } > MongoDB Assistant</ span >
73+ < Badge variant = "blue" > Preview</ Badge >
74+ </ div >
6575 < IconButton
6676 aria-label = "Clear chat"
6777 onClick = { ( ) => {
You can’t perform that action at this time.
0 commit comments