Skip to content

Commit 509c4ba

Browse files
authored
RI-7727: update db warning status styles (#5174)
1 parent bbdca7d commit 509c4ba

File tree

3 files changed

+18
-60
lines changed

3 files changed

+18
-60
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
import styled from 'styled-components'
22

3+
import { RiIcon } from 'uiSrc/components/base/icons'
4+
35
export const IconWrapper = styled.div<{ children?: React.ReactNode }>`
46
margin-left: -${({ theme }) => theme.core.space.space150};
57
`
8+
9+
export const InfoIcon = styled(RiIcon).attrs({
10+
type: 'ToastInfoIcon',
11+
size: 'S',
12+
color: 'custom',
13+
})`
14+
color: ${({ theme }) => theme.color.orange500};
15+
margin-left: -1px;
16+
`

redisinsight/ui/src/pages/home/components/db-status/DbStatus.tsx

Lines changed: 7 additions & 12 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 { differenceInDays } from 'date-fns'
43

54
import { useSelector } from 'react-redux'
@@ -15,13 +14,13 @@ import {
1514
import { RiTooltip } from 'uiSrc/components'
1615
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
1716
import { Indicator } from 'uiSrc/components/base/text/text.styles'
17+
import { Row } from 'uiSrc/components/base/layout/flex'
1818
import {
1919
CHECK_CLOUD_DATABASE,
2020
WARNING_WITH_CAPABILITY,
2121
WARNING_WITHOUT_CAPABILITY,
2222
} from './texts'
23-
import styles from './styles.module.scss'
24-
import { IconWrapper } from './DbStatus.styles'
23+
import { IconWrapper, InfoIcon } from './DbStatus.styles'
2524

2625
export interface Props {
2726
id: string
@@ -77,14 +76,10 @@ const DbStatus = (props: Props) => {
7776
/>
7877
}
7978
position="right"
80-
className={styles.tooltip}
8179
>
82-
<div
83-
className={cx(styles.status, styles.warning)}
84-
data-testid={`database-status-${type}-${id}`}
85-
>
86-
!
87-
</div>
80+
<IconWrapper data-testid={`database-status-${type}-${id}`}>
81+
<InfoIcon />
82+
</IconWrapper>
8883
</RiTooltip>
8984
)
9085

@@ -133,10 +128,10 @@ const WarningTooltipContent = (props: WarningTooltipProps) => {
133128
})
134129

135130
return (
136-
<div className={styles.warningTooltipContent}>
131+
<Row gap="l">
137132
<RiIcon type="AlarmIcon" customSize="50px" />
138133
<div>{content}</div>
139-
</div>
134+
</Row>
140135
)
141136
}
142137

redisinsight/ui/src/pages/home/components/db-status/styles.module.scss

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)