Skip to content

Commit 3e4a342

Browse files
authored
RI-7283 - Adding JSON elements from the inline editor have the buttons missaligned (#4840)
1 parent 55d162e commit 3e4a342

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/AddItem.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useEffect, useState } from 'react'
22
import cx from 'classnames'
33
import { useSelector } from 'react-redux'
4+
import styled from 'styled-components'
45

56
import * as keys from 'uiSrc/constants/keys'
67
import { rejsonDataSelector } from 'uiSrc/slices/browser/rejson'
@@ -20,6 +21,11 @@ import { JSONErrors } from '../../constants'
2021

2122
import styles from '../../styles.module.scss'
2223

24+
const ControlsWrapper = styled.div.attrs({ className: styles.controls })`
25+
height: 34px;
26+
min-height: 34px;
27+
`
28+
2329
export interface Props {
2430
isPair: boolean
2531
onCancel: () => void
@@ -126,7 +132,7 @@ const AddItem = (props: Props) => {
126132
onCancel={() => setIsConfirmationVisible(false)}
127133
onConfirm={confirmApply}
128134
>
129-
<div className={cx(styles.controls)}>
135+
<ControlsWrapper>
130136
<IconButton
131137
size="M"
132138
icon={CancelSlimIcon}
@@ -145,7 +151,7 @@ const AddItem = (props: Props) => {
145151
className={styles.applyBtn}
146152
data-testid="apply-btn"
147153
/>
148-
</div>
154+
</ControlsWrapper>
149155
</ConfirmOverwrite>
150156
</form>
151157
{!!error && (

redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/styles.module.scss

Whitespace-only changes.

0 commit comments

Comments
 (0)