Skip to content

Commit 928d546

Browse files
committed
RI-7740: update instances navigation styles
1 parent a7029d3 commit 928d546

File tree

6 files changed

+29
-39
lines changed

6 files changed

+29
-39
lines changed

redisinsight/ui/src/components/instance-header/InstanceHeader.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { EditIcon } from 'uiSrc/components/base/icons'
4444
import { Text } from 'uiSrc/components/base/text'
4545
import { NumericInput } from 'uiSrc/components/base/inputs'
4646
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
47+
import { Link } from 'uiSrc/components/base/link/Link'
4748
import InstancesNavigationPopover from './components/instances-navigation-popover'
4849
import styles from './styles.module.scss'
4950

@@ -159,19 +160,20 @@ const InstanceHeader = ({ onChangeDbIndex }: Props) => {
159160
: 'Redis Databases'
160161
}
161162
>
162-
<Text
163-
className={styles.breadCrumbLink}
163+
<Link
164+
color="subdued"
165+
underline
166+
variant="inline"
164167
aria-label={
165168
server?.buildType === BuildType.RedisStack
166169
? 'Edit database'
167170
: 'Redis Databases'
168171
}
169172
data-testid="my-redis-db-btn"
170173
onClick={goHome}
171-
onKeyDown={goHome}
172174
>
173175
Databases
174-
</Text>
176+
</Link>
175177
</RiTooltip>
176178
</FeatureFlagComponent>
177179
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import styled from 'styled-components'
2+
3+
import { Row } from 'uiSrc/components/base/layout/flex'
4+
5+
export const ButtonWrapper = styled(Row)`
6+
cursor: pointer;
7+
`

redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/InstancesNavigationPopover.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import { localStorageService } from 'uiSrc/services'
1313
import { filterAndSort } from 'uiSrc/utils'
1414
import { Spacer } from 'uiSrc/components/base/layout/spacer'
1515
import { Text } from 'uiSrc/components/base/text'
16-
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
1716
import Tabs, { TabInfo } from 'uiSrc/components/base/layout/tabs'
1817
import { RiPopover } from 'uiSrc/components/base'
1918
import InstancesList from './components/instances-list'
19+
import { ChevronDownIcon } from 'uiSrc/components/base/icons'
20+
import { ButtonWrapper } from './InstancesNavigationPopover.styles'
2021
import styles from './styles.module.scss'
2122

2223
export interface Props {
@@ -117,16 +118,15 @@ const InstancesNavigationPopover = ({ name }: Props) => {
117118
isOpen={isPopoverOpen}
118119
closePopover={() => showPopover()}
119120
button={
120-
<Text
121-
className={styles.showPopoverBtn}
121+
<ButtonWrapper
122+
align="center"
123+
gap="s"
122124
onClick={() => showPopover()}
123125
data-testid="nav-instance-popover-btn"
124126
>
125-
<b className={styles.breadCrumbLink}>{name}</b>
126-
<span>
127-
<RiIcon color="primary500" type="CaretDownIcon" />
128-
</span>
129-
</Text>
127+
<Text color="primary">{name}</Text>
128+
<ChevronDownIcon size="S" />
129+
</ButtonWrapper>
130130
}
131131
>
132132
<div className={styles.wrapper}>

redisinsight/ui/src/components/instance-header/components/instances-navigation-popover/styles.module.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
.showPopoverBtn {
2-
display: flex;
3-
justify-content: flex-start;
4-
align-items: center;
5-
gap: 4px;
6-
cursor: pointer;
7-
}
8-
91
.breadCrumbLink {
102
cursor: pointer;
113
text-decoration: underline;

redisinsight/ui/src/components/rdi-instance-header/RdiInstanceHeader.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
1515
import { isAnyFeatureEnabled } from 'uiSrc/utils/features'
1616
import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1717
import { Text } from 'uiSrc/components/base/text'
18+
import { Link } from 'uiSrc/components/base/link/Link'
1819
import InstancesNavigationPopover from '../instance-header/components/instances-navigation-popover'
1920
import styles from './styles.module.scss'
2021

@@ -43,22 +44,23 @@ const RdiInstanceHeader = () => {
4344
>
4445
<div>
4546
<RiTooltip position="bottom" content="My RDI instances">
46-
<Text
47-
className={styles.breadCrumbLink}
47+
<Link
48+
color="subdued"
49+
underline
50+
variant="inline"
4851
aria-label="My RDI instances"
4952
data-testid="my-rdi-instances-btn"
5053
onClick={goHome}
51-
onKeyDown={goHome}
5254
>
53-
RDI instances
54-
</Text>
55+
Data integration
56+
</Link>
5557
</RiTooltip>
5658
</div>
5759
<div style={{ flex: 1, overflow: 'hidden' }}>
5860
<div style={{ maxWidth: '100%' }}>
5961
<Row align="center">
6062
<FlexItem>
61-
<Text className={styles.divider}>&#62;</Text>
63+
<Text className={styles.divider}>/</Text>
6264
</FlexItem>
6365
<FlexItem grow style={{ overflow: 'hidden' }}>
6466
<InstancesNavigationPopover name={name} />

redisinsight/ui/src/components/rdi-instance-header/styles.module.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@
1010
& > div {
1111
display: flex;
1212
}
13-
14-
.breadCrumbLink {
15-
color: var(--euiColorPrimary) !important;
16-
font-size: 14px !important;
17-
line-height: 20px;
18-
font-weight: 400;
19-
cursor: pointer;
20-
text-decoration: underline;
21-
22-
&:hover {
23-
text-decoration: none;
24-
}
25-
}
2613
}
2714

2815
.rdiName {

0 commit comments

Comments
 (0)