55 * 2.0.
66 */
77import React , { lazy , Suspense , useMemo , useCallback , useEffect , useRef } from 'react' ;
8- import { EuiButtonGroup , EuiFlexGroup , EuiFlexItem , EuiSkeletonText } from '@elastic/eui' ;
8+ import {
9+ COLOR_MODES_STANDARD ,
10+ EuiButtonGroup ,
11+ EuiFlexGroup ,
12+ EuiFlexItem ,
13+ EuiSkeletonText ,
14+ useEuiTheme ,
15+ } from '@elastic/eui' ;
916import type { AvailablePackagesHookType , IntegrationCardItem } from '@kbn/fleet-plugin/public' ;
1017import { noop } from 'lodash' ;
1118
@@ -30,6 +37,7 @@ import { useIntegrationCardList } from './use_integration_card_list';
3037import { IntegrationTabId } from './types' ;
3138import { IntegrationCardTopCallout } from './callouts/integration_card_top_callout' ;
3239import { trackOnboardingLinkClick } from '../../../lib/telemetry' ;
40+ import { useIntegrationCardGridTabsStyles } from './integration_card_grid_tabs.styles' ;
3341
3442export interface IntegrationsCardGridTabsProps {
3543 installedIntegrationsCount : number ;
@@ -49,6 +57,8 @@ export const IntegrationsCardGridTabsComponent = React.memo<IntegrationsCardGrid
4957 ( { installedIntegrationsCount, isAgentRequired, useAvailablePackages } ) => {
5058 const { spaceId } = useOnboardingContext ( ) ;
5159 const scrollElement = useRef < HTMLDivElement > ( null ) ;
60+ const { colorMode } = useEuiTheme ( ) ;
61+ const isDark = colorMode === COLOR_MODES_STANDARD . dark ;
5262 const [ toggleIdSelected , setSelectedTabIdToStorage ] = useStoredIntegrationTabId (
5363 spaceId ,
5464 DEFAULT_TAB . id
@@ -78,6 +88,8 @@ export const IntegrationsCardGridTabsComponent = React.memo<IntegrationsCardGrid
7888
7989 const selectedTab = useMemo ( ( ) => INTEGRATION_TABS_BY_ID [ toggleIdSelected ] , [ toggleIdSelected ] ) ;
8090
91+ const buttonGroupStyles = useIntegrationCardGridTabsStyles ( ) ;
92+
8193 const onSearchTermChanged = useCallback (
8294 ( searchQuery : string ) => {
8395 setSearchTerm ( searchQuery ) ;
@@ -144,6 +156,7 @@ export const IntegrationsCardGridTabsComponent = React.memo<IntegrationsCardGrid
144156 >
145157 < EuiFlexItem grow = { false } >
146158 < EuiButtonGroup
159+ css = { isDark ? buttonGroupStyles : undefined }
147160 buttonSize = "compressed"
148161 color = "primary"
149162 idSelected = { toggleIdSelected }
0 commit comments