File tree Expand file tree Collapse file tree 2 files changed +41
-4
lines changed
redisinsight/ui/src/pages/vector-search/components/commands-view/CommandsView Expand file tree Collapse file tree 2 files changed +41
-4
lines changed Original file line number Diff line number Diff line change
1
+ import styled from 'styled-components'
2
+
3
+ /* TODO: use theme when it supports theme.semantic.core.radius */
4
+ // to replace var(--border-radius-medium)
5
+ export const StyledWrapper = styled . div `
6
+ flex: 1;
7
+ height: calc(100% - var(--border-radius-medium));
8
+ width: 100%;
9
+ background-color: ${ ( { theme } ) =>
10
+ theme . semantic ?. color . background . neutral100 } ;
11
+ border: 1px solid ${ ( { theme } ) => theme . semantic . color . border . neutral500 } ;
12
+ border-radius: var(--border-radius-medium);
13
+ // HACK: to fix rectangle like view in rounded borders wrapper
14
+ padding-bottom: ${ ( { theme } ) => theme . core . space . space025 } ;
15
+
16
+ display: flex;
17
+ flex-direction: column;
18
+
19
+ position: relative;
20
+ `
21
+
22
+ export const StyledContainer = styled . div `
23
+ flex: 1;
24
+ width: 100%;
25
+ overflow: auto;
26
+ color: ${ ( { theme } ) => theme . color . gray700 } ;
27
+ `
28
+
29
+ // .container {
30
+ // @include eui.scrollBar;
31
+ // color: var(--euiTextSubduedColor) !important;
32
+
33
+ // flex: 1;
34
+ // width: 100%;
35
+ // overflow: auto;
36
+ // }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { collectTelemetryQueryReRun } from 'uiSrc/pages/vector-search/telemetry'
16
16
import QueryCard from '../../QueryCard'
17
17
18
18
import styles from './styles.module.scss'
19
+ import { StyledContainer , StyledWrapper } from './CommandsView.styles'
19
20
20
21
export interface Props {
21
22
isResultsLoaded : boolean
@@ -80,7 +81,7 @@ const CommandsView = (props: Props) => {
80
81
}
81
82
82
83
return (
83
- < div className = { styles . wrapper } >
84
+ < StyledWrapper >
84
85
{ ! isResultsLoaded && (
85
86
< ProgressBarLoader color = "primary" data-testid = "progress-wb-history" />
86
87
) }
@@ -98,7 +99,7 @@ const CommandsView = (props: Props) => {
98
99
</ EmptyButton >
99
100
</ div >
100
101
) }
101
- < div className = { cx ( styles . container ) } >
102
+ < StyledContainer >
102
103
< div ref = { scrollDivRef } />
103
104
{ items ?. length
104
105
? items . map (
@@ -161,8 +162,8 @@ const CommandsView = (props: Props) => {
161
162
)
162
163
: null }
163
164
{ isResultsLoaded && ! items . length && ( noResultsPlaceholder ?? null ) }
164
- </ div >
165
- </ div >
165
+ </ StyledContainer >
166
+ </ StyledWrapper >
166
167
)
167
168
}
168
169
You can’t perform that action at this time.
0 commit comments