@@ -11,6 +11,7 @@ import {
1111 fontFamilies ,
1212 InfoSprinkle ,
1313 Tooltip ,
14+ useDarkMode ,
1415} from '@mongodb-js/compass-components' ;
1516import React , { useState , useCallback , useEffect } from 'react' ;
1617import {
@@ -52,12 +53,18 @@ const coveredQueriesHeaderContainerStyles = css({
5253
5354const coveredQueriesCalloutStyles = css ( {
5455 border : `1px solid ${ palette . gray . light2 } ` ,
55- background : palette . gray . light3 ,
5656 borderRadius : '12px' ,
5757 padding : spacing [ 600 ] ,
5858 marginBottom : spacing [ 600 ] ,
5959} ) ;
6060
61+ const lightModeCoveredQueriesCalloutStyles = css ( {
62+ background : palette . gray . light3 ,
63+ } ) ;
64+
65+ const darkModeCoveredQueriesCalloutStyles = css ( {
66+ background : palette . black ,
67+ } ) ;
6168const buttonContainerStyles = css ( {
6269 display : 'flex' ,
6370 justifyContent : 'right' ,
@@ -171,6 +178,7 @@ const IndexFlowSection = ({
171178 onErrorEncountered,
172179 onErrorCleared,
173180} : IndexFlowSectionProps ) => {
181+ const darkMode = useDarkMode ( ) ;
174182 const [ isCodeEquivalentToggleChecked , setIsCodeEquivalentToggleChecked ] =
175183 useState ( false ) ;
176184 const [ hasFieldChanges , setHasFieldChanges ] = useState ( false ) ;
@@ -312,7 +320,14 @@ const IndexFlowSection = ({
312320 </ InfoSprinkle >
313321 </ div >
314322
315- < div className = { coveredQueriesCalloutStyles } >
323+ < div
324+ className = { cx (
325+ coveredQueriesCalloutStyles ,
326+ darkMode
327+ ? darkModeCoveredQueriesCalloutStyles
328+ : lightModeCoveredQueriesCalloutStyles
329+ ) }
330+ >
316331 { /* Covered Queries */ }
317332 < Body
318333 className = { codeStyles }
0 commit comments