Skip to content

Commit 24b32d8

Browse files
committed
wip 2
1 parent e2e4dc7 commit 24b32d8

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView/CommandsView.styles.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const StyledWrapper = styled.div`
1111
border: 1px solid ${({ theme }) => theme.semantic.color.border.neutral500};
1212
border-radius: var(--border-radius-medium);
1313
// HACK: to fix rectangle like view in rounded borders wrapper
14-
padding-bottom: ${({ theme }) => theme.core.space.space025};
14+
padding-bottom: ${({ theme }) => theme.core.space.space050};
1515
1616
display: flex;
1717
flex-direction: column;
@@ -24,13 +24,17 @@ export const StyledContainer = styled.div`
2424
width: 100%;
2525
overflow: auto;
2626
color: ${({ theme }) => theme.color.gray700};
27+
// @include eui.scrollBar;
2728
`
2829

29-
// .container {
30-
// @include eui.scrollBar;
31-
// color: var(--euiTextSubduedColor) !important;
30+
export const StyledHeader = styled.div`
31+
height: 42px;
32+
display: flex;
33+
align-items: center;
34+
justify-content: flex-end;
35+
padding: 0 ${({ theme }) => theme.core.space.space150};
3236
33-
// flex: 1;
34-
// width: 100%;
35-
// overflow: auto;
36-
// }
37+
flex-shrink: 0;
38+
border-bottom: 1px solid
39+
${({ theme }) => theme.semantic.color.border.neutral500};
40+
`

redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView/CommandsView.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react'
2-
import cx from 'classnames'
32
import { useParams } from 'react-router-dom'
43

54
import { CodeButtonParams } from 'uiSrc/constants'
@@ -15,8 +14,11 @@ import { ProgressBarLoader } from 'uiSrc/components/base/display'
1514
import { collectTelemetryQueryReRun } from 'uiSrc/pages/vector-search/telemetry'
1615
import QueryCard from '../../QueryCard'
1716

18-
import styles from './styles.module.scss'
19-
import { StyledContainer, StyledWrapper } from './CommandsView.styles'
17+
import {
18+
StyledContainer,
19+
StyledHeader,
20+
StyledWrapper,
21+
} from './CommandsView.styles'
2022

2123
export interface Props {
2224
isResultsLoaded: boolean
@@ -86,18 +88,17 @@ const CommandsView = (props: Props) => {
8688
<ProgressBarLoader color="primary" data-testid="progress-wb-history" />
8789
)}
8890
{!!items?.length && (
89-
<div className={styles.header}>
91+
<StyledHeader>
9092
<EmptyButton
9193
size="small"
9294
icon={DeleteIcon}
93-
className={styles.clearAllBtn}
9495
onClick={() => onAllQueriesDelete?.()}
9596
disabled={clearing || processing}
9697
data-testid="clear-history-btn"
9798
>
9899
Clear Results
99100
</EmptyButton>
100-
</div>
101+
</StyledHeader>
101102
)}
102103
<StyledContainer>
103104
<div ref={scrollDivRef} />

0 commit comments

Comments
 (0)