11import React , { useEffect } from 'react'
22import { useDispatch , useSelector } from 'react-redux'
33import { useParams } from 'react-router-dom'
4- import styled from 'styled-components'
54
65import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
76import {
@@ -24,59 +23,17 @@ import { FeatureFlags } from 'uiSrc/constants'
2423import { Text } from 'uiSrc/components/base/text'
2524import { FlexItem , Row } from 'uiSrc/components/base/layout/flex'
2625import { HideFor , ShowFor } from 'uiSrc/components/base/utils/ShowHide'
27- import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
2826import {
2927 CliIcon ,
3028 DocumentationIcon ,
3129 ProfilerIcon ,
3230} from 'uiSrc/components/base/icons'
3331import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
3432import styles from '../../styles.module.scss'
35-
36- const ComponentBadge = styled ( RiBadge ) < { isActive ?: boolean } > `
37- background-color: transparent !important;
38- color: var(--euiTextSubduedColor) !important;
39- height: 18px !important;
40- border: none !important;
41- cursor: pointer;
42- user-select: none;
43-
44- &[title] {
45- pointer-events: none;
46- }
47-
48- ${ ( { isActive, theme } ) => {
49- // TODO: try to replace with semantic colors once the palette is bigger.
50- const bgColorActive =
51- theme . name === 'dark' ? theme . color . azure600 : theme . color . azure200
52- const bgColorHover =
53- theme . name === 'dark' ? theme . color . azure500 : theme . color . azure300
54-
55- const color =
56- theme . name === 'dark' ? theme . color . azure200 : theme . color . azure600
57-
58- return `
59- ${ isActive ? `background-color: ${ bgColorActive } !important;` : '' }
60- ${ isActive ? `color: ${ color } !important;` : '' }
61- &:hover {
62- background-color: ${ bgColorHover } !important;
63- color: ${ color } !important;
64- }
65- `
66- } }
67- `
68-
69- const ContainerMinimized = styled . div `
70- display: flex;
71- align-items: center;
72- padding-left: ${ ( { theme } ) => theme . core . space . space050 } ;
73- height: 26px;
74- line-height: 26px;
75- border-left: 1px solid
76- ${ ( { theme } ) => theme . semantic . color . border . neutral500 } ;
77- border-right: 1px solid
78- ${ ( { theme } ) => theme . semantic . color . border . neutral500 } ;
79- `
33+ import {
34+ ComponentBadge ,
35+ ContainerMinimized ,
36+ } from './ButtonGroupMinimized.styles'
8037
8138const BottomGroupMinimized = ( ) => {
8239 const { instanceId = '' } = useParams < { instanceId : string } > ( )
@@ -138,11 +95,7 @@ const BottomGroupMinimized = () => {
13895 return (
13996 < ContainerMinimized >
14097 < Row align = "center" responsive = { false } style = { { height : '100%' } } gap = "s" >
141- < FlexItem
142- className = { styles . componentBadgeItem }
143- onClick = { handleExpandCli }
144- data-testid = "expand-cli"
145- >
98+ < FlexItem onClick = { handleExpandCli } data-testid = "expand-cli" >
14699 < ComponentBadge
147100 withIcon
148101 icon = { CliIcon }
@@ -156,7 +109,6 @@ const BottomGroupMinimized = () => {
156109 </ FlexItem >
157110
158111 < FlexItem
159- className = { styles . componentBadgeItem }
160112 onClick = { handleExpandHelper }
161113 data-testid = "expand-command-helper"
162114 >
@@ -172,11 +124,7 @@ const BottomGroupMinimized = () => {
172124 />
173125 </ FlexItem >
174126 < FeatureFlagComponent name = { FeatureFlags . envDependent } >
175- < FlexItem
176- className = { styles . componentBadgeItem }
177- onClick = { handleExpandMonitor }
178- data-testid = "expand-monitor"
179- >
127+ < FlexItem onClick = { handleExpandMonitor } data-testid = "expand-monitor" >
180128 < ComponentBadge
181129 withIcon
182130 icon = { ProfilerIcon }
0 commit comments