Skip to content

Commit 5a6a10f

Browse files
authored
RI-6855: Sync latest base branch changes (#4808)
1 parent 30560d7 commit 5a6a10f

File tree

92 files changed

+1276
-903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1276
-903
lines changed
Lines changed: 4 additions & 4 deletions
Loading

redisinsight/ui/src/components/auto-refresh/AutoRefresh.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ const AutoRefresh = ({
250250
anchorPosition="downRight"
251251
isOpen={isPopoverOpen}
252252
anchorClassName={styles.anchorWrapper}
253-
panelClassName={cx('popover-without-top-tail', styles.popoverWrapper)}
253+
panelClassName={cx('popover-without-top-tail', styles.popoverWrapper, {
254+
[styles.popoverWrapperEditing]: editingRate,
255+
})}
254256
closePopover={closePopover}
255257
button={
256258
<IconButton

redisinsight/ui/src/components/auto-refresh/styles.module.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@
6161

6262
input {
6363
height: 30px !important;
64-
border-radius: 0px !important;
64+
border-radius: 0 !important;
6565
background-color: var(--euiColorLightestShade) !important;
6666
}
6767
}
6868
}
69+
.popoverWrapperEditing {
70+
height: 140px;
71+
}
6972

7073
.inputContainer {
7174
height: 30px;

redisinsight/ui/src/components/base/display/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import Loader from './loader/Loader'
22
import ProgressBarLoader from './progress-bar/ProgressBarLoader'
33
import RiImage from './image/RiImage'
44
import RiLoadingLogo from './loading-logo/RiLoadingLogo'
5+
import { Modal } from './modal'
6+
7+
export { Loader, ProgressBarLoader, RiImage, RiLoadingLogo, Modal }
58

6-
export { Loader, ProgressBarLoader, RiImage, RiLoadingLogo }
79
export { RICollapsibleNavGroup } from './collapsible-nav-group/RICollapsibleNavGroup'
810

911
export type { RICollapsibleNavGroupProps } from './collapsible-nav-group/RICollapsibleNavGroup'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Modal } from '@redis-ui/components'

redisinsight/ui/src/components/base/display/toast/RiToast.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,12 @@ const StyledMessage = styled.div<{ theme: Theme }>`
1717
margin-bottom: ${({ theme }) => theme.core.space.space100};
1818
`
1919

20+
type RiToastType = ToastContentParams &
21+
CommonProps & {
22+
onClose?: VoidFunction
23+
}
2024
export const riToast = (
21-
{
22-
onClose,
23-
actions,
24-
message,
25-
...content
26-
}: ToastContentParams &
27-
CommonProps & {
28-
onClose?: VoidFunction
29-
},
25+
{ onClose, actions, message, ...content }: RiToastType,
3026
options?: ToastOptions | undefined,
3127
) => {
3228
const toastContent: ToastContentParams = {

redisinsight/ui/src/components/base/forms/FormField.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React, { ComponentProps } from 'react'
2+
import { FormField as RedisFormField, TooltipProvider } from '@redis-ui/components'
3+
4+
export type RedisFormFieldProps = ComponentProps<typeof RedisFormField> & {
5+
infoIconProps?: any
6+
}
7+
8+
export function FormField(props: RedisFormFieldProps) {
9+
// eslint-disable-next-line react/destructuring-assignment
10+
if (props.infoIconProps) {
11+
return <TooltipProvider>
12+
<RedisFormField {...props} />
13+
</TooltipProvider>
14+
}
15+
return <RedisFormField {...props} />
16+
}

redisinsight/ui/src/components/base/forms/buttons/EmptyButton.tsx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,44 @@ import React from 'react'
22
import { TextButton } from '@redis-ui/components'
33
import { ButtonIcon } from 'uiSrc/components/base/forms/buttons/Button'
44
import { IconType } from 'uiSrc/components/base/icons'
5+
import { Row } from '../../layout/flex'
6+
import { FlexProps } from '../../layout/flex/flex.styles'
57

68
export type ButtonProps = React.ComponentProps<typeof TextButton> & {
79
icon?: IconType
810
iconSide?: 'left' | 'right'
911
loading?: boolean
1012
size?: 'small' | 'large' | 'medium'
13+
justify?: FlexProps['justify']
1114
}
1215
export const EmptyButton = ({
1316
children,
1417
icon,
1518
iconSide = 'left',
1619
loading,
1720
size = 'small',
21+
justify = 'center',
1822
...rest
1923
}: ButtonProps) => (
2024
<TextButton {...rest}>
21-
<ButtonIcon
22-
buttonSide="left"
23-
icon={icon}
24-
iconSide={iconSide}
25-
loading={loading}
26-
size={size}
27-
/>
28-
{children}
29-
<ButtonIcon
30-
buttonSide="right"
31-
icon={icon}
32-
iconSide={iconSide}
33-
loading={loading}
34-
size={size}
35-
/>
25+
<Row
26+
justify={justify}
27+
>
28+
<ButtonIcon
29+
buttonSide="left"
30+
icon={icon}
31+
iconSide={iconSide}
32+
loading={loading}
33+
size={size}
34+
/>
35+
{children}
36+
<ButtonIcon
37+
buttonSide="right"
38+
icon={icon}
39+
iconSide={iconSide}
40+
loading={loading}
41+
size={size}
42+
/>
43+
</Row>
3644
</TextButton>
3745
)
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
import React from 'react'
22
import { IconButton as RedisUiIconButton } from '@redis-ui/components'
3+
import * as Icons from 'uiSrc/components/base/icons/iconRegistry'
4+
import { AllIconsType } from 'uiSrc/components/base/icons'
35

46
export type ButtonProps = React.ComponentProps<typeof RedisUiIconButton>
57

68
export type IconType = ButtonProps['icon']
7-
export const IconButton = (props: ButtonProps) => (
8-
<RedisUiIconButton {...props} />
9-
)
9+
export type IconButtonProps = Omit<ButtonProps, 'icon'> & {
10+
icon: IconType | string
11+
}
12+
export const IconButton = ({ icon, size, ...props }: IconButtonProps) => {
13+
let buttonIcon: IconType
14+
if (typeof icon === 'string') {
15+
buttonIcon = Icons[icon as AllIconsType]
16+
} else {
17+
buttonIcon = icon
18+
}
19+
return <RedisUiIconButton icon={buttonIcon} {...props} />
20+
}

0 commit comments

Comments
 (0)