@@ -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 ) ;
@@ -321,7 +329,14 @@ const IndexFlowSection = ({
321329 </ InfoSprinkle >
322330 </ div >
323331
324- < div className = { coveredQueriesCalloutStyles } >
332+ < div
333+ className = { cx (
334+ coveredQueriesCalloutStyles ,
335+ darkMode
336+ ? darkModeCoveredQueriesCalloutStyles
337+ : lightModeCoveredQueriesCalloutStyles
338+ ) }
339+ >
325340 { /* Covered Queries */ }
326341 < Body
327342 className = { codeStyles }
0 commit comments