Skip to content

Commit e2e4dc7

Browse files
committed
wip
1 parent c236218 commit e2e4dc7

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
// }

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { collectTelemetryQueryReRun } from 'uiSrc/pages/vector-search/telemetry'
1616
import QueryCard from '../../QueryCard'
1717

1818
import styles from './styles.module.scss'
19+
import { StyledContainer, StyledWrapper } from './CommandsView.styles'
1920

2021
export interface Props {
2122
isResultsLoaded: boolean
@@ -80,7 +81,7 @@ const CommandsView = (props: Props) => {
8081
}
8182

8283
return (
83-
<div className={styles.wrapper}>
84+
<StyledWrapper>
8485
{!isResultsLoaded && (
8586
<ProgressBarLoader color="primary" data-testid="progress-wb-history" />
8687
)}
@@ -98,7 +99,7 @@ const CommandsView = (props: Props) => {
9899
</EmptyButton>
99100
</div>
100101
)}
101-
<div className={cx(styles.container)}>
102+
<StyledContainer>
102103
<div ref={scrollDivRef} />
103104
{items?.length
104105
? items.map(
@@ -161,8 +162,8 @@ const CommandsView = (props: Props) => {
161162
)
162163
: null}
163164
{isResultsLoaded && !items.length && (noResultsPlaceholder ?? null)}
164-
</div>
165-
</div>
165+
</StyledContainer>
166+
</StyledWrapper>
166167
)
167168
}
168169

0 commit comments

Comments
 (0)