Skip to content

Commit 076711f

Browse files
RI-7607,7609: fix colors in wb (#5048)
* RI-7609: replace custom action buttons with ToggleButton RI-7607: replace purple border with colors we use in keys list onnhover * RI-7607: remove QABtn
1 parent cdf7a19 commit 076711f

File tree

3 files changed

+16
-53
lines changed

3 files changed

+16
-53
lines changed
Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,5 @@
11
import styled from 'styled-components'
2-
import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
32
import Divider from 'uiSrc/components/divider/Divider'
43
export const QADivider = styled(Divider)`
54
height: 20px;
65
`
7-
export const QABtn = styled(EmptyButton)<{ $active: boolean }>`
8-
height: 24px;
9-
min-width: auto;
10-
min-height: auto;
11-
border-radius: 4px;
12-
background: ${({ $active }) =>
13-
$active ? 'var(--browserComponentActive)' : 'transparent'};
14-
box-shadow: none;
15-
16-
border: 1px solid
17-
${({ $active }) => ($active ? 'var(--euiColorPrimary)' : 'transparent')};
18-
19-
:global(.RI-flex-row) {
20-
padding: 0 6px;
21-
font:
22-
normal normal 400 14px/17px Graphik,
23-
sans-serif;
24-
}
25-
26-
&:focus,
27-
&:active {
28-
outline: 0;
29-
}
30-
31-
svg {
32-
margin-top: 1px;
33-
width: 14px;
34-
height: 14px;
35-
}
36-
37-
svg path {
38-
fill: var(--euiTextSubduedColor);
39-
}
40-
`

redisinsight/ui/src/components/query/query-actions/QueryActions.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ import { KEYBOARD_SHORTCUTS } from 'uiSrc/constants'
55
import { KeyboardShortcut, RiTooltip } from 'uiSrc/components'
66
import { isGroupMode } from 'uiSrc/utils'
77

8-
import { GroupModeIcon, RawModeIcon } from 'uiSrc/components/base/icons'
8+
import { RiIcon } from 'uiSrc/components/base/icons'
99

1010
import { Spacer } from 'uiSrc/components/base/layout/spacer'
1111
import { Text } from 'uiSrc/components/base/text'
1212
import RunButton from 'uiSrc/components/query/components/RunButton'
1313
import { Row } from 'uiSrc/components/base/layout/flex'
14-
import {
15-
QABtn,
16-
QADivider,
17-
} from 'uiSrc/components/query/query-actions/QueryActions.styles'
14+
import { QADivider } from 'uiSrc/components/query/query-actions/QueryActions.styles'
15+
import { ToggleButton } from 'uiSrc/components/base/forms/buttons'
1816

1917
export interface Props {
2018
onChangeMode?: () => void
@@ -53,15 +51,15 @@ const QueryActions = (props: Props) => {
5351
content="Enables the raw output mode"
5452
data-testid="change-mode-tooltip"
5553
>
56-
<QABtn
57-
onClick={() => onChangeMode()}
58-
icon={RawModeIcon}
54+
<ToggleButton
55+
onPressedChange={() => onChangeMode()}
5956
disabled={isLoading}
60-
$active={activeMode === RunQueryMode.Raw}
57+
pressed={activeMode === RunQueryMode.Raw}
6158
data-testid="btn-change-mode"
6259
>
63-
Raw mode
64-
</QABtn>
60+
<RiIcon size="m" type="RawModeIcon" />
61+
<Text size="s">Raw mode</Text>
62+
</ToggleButton>
6563
</RiTooltip>
6664
)}
6765
{onChangeGroupMode && (
@@ -77,15 +75,15 @@ const QueryActions = (props: Props) => {
7775
}
7876
data-testid="group-results-tooltip"
7977
>
80-
<QABtn
81-
onClick={() => onChangeGroupMode()}
78+
<ToggleButton
79+
onPressedChange={() => onChangeGroupMode()}
8280
disabled={isLoading}
83-
icon={GroupModeIcon}
84-
$active={isGroupMode(resultsMode)}
81+
pressed={isGroupMode(resultsMode)}
8582
data-testid="btn-change-group-mode"
8683
>
87-
Group results
88-
</QABtn>
84+
<RiIcon size="m" type="GroupModeIcon" />
85+
<Text size="s">Group results</Text>
86+
</ToggleButton>
8987
</RiTooltip>
9088
)}
9189
<QADivider orientation="vertical" colorVariable="separatorColor" />

redisinsight/ui/src/components/query/query-card/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $breakpoint-m: 1050px;
1818
}
1919

2020
&.isOpen .container {
21-
border-color: var(--euiColorPrimary);
21+
border-color: var(--browserComponentActive);
2222
}
2323

2424
&:global(.fullscreen) {

0 commit comments

Comments
 (0)