File tree Expand file tree Collapse file tree 2 files changed +24
-15
lines changed
components/base/forms/buttons
pages/home/components/database-list-component Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -2,36 +2,44 @@ import React from 'react'
2
2
import { TextButton } from '@redis-ui/components'
3
3
import { ButtonIcon } from 'uiSrc/components/base/forms/buttons/Button'
4
4
import { IconType } from 'uiSrc/components/base/icons'
5
+ import { Row } from '../../layout/flex'
6
+ import { FlexProps } from '../../layout/flex/flex.styles'
5
7
6
8
export type ButtonProps = React . ComponentProps < typeof TextButton > & {
7
9
icon ?: IconType
8
10
iconSide ?: 'left' | 'right'
9
11
loading ?: boolean
10
12
size ?: 'small' | 'large' | 'medium'
13
+ justify ?: FlexProps [ 'justify' ]
11
14
}
12
15
export const EmptyButton = ( {
13
16
children,
14
17
icon,
15
18
iconSide = 'left' ,
16
19
loading,
17
20
size = 'small' ,
21
+ justify = 'center' ,
18
22
...rest
19
23
} : ButtonProps ) => (
20
24
< 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 >
36
44
</ TextButton >
37
45
)
Original file line number Diff line number Diff line change @@ -619,6 +619,7 @@ const DatabasesListWrapper = (props: Props) => {
619
619
< div className = "controlsPopoverContent" >
620
620
< div >
621
621
< EmptyButton
622
+ justify = "start"
622
623
icon = { EditIcon }
623
624
className = "editInstanceBtn"
624
625
aria-label = "Edit instance"
You can’t perform that action at this time.
0 commit comments