Skip to content

Commit 23337a4

Browse files
committed
fix(ui): added spacing betwen action buttons in edit json key
1 parent 223401d commit 23337a4

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed

redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/monaco-editor/MonacoEditor.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
PrimaryButton,
1414
SecondaryButton,
1515
} from 'uiSrc/components/base/forms/buttons'
16+
import { Row } from 'uiSrc/components/base/layout/flex'
17+
import { Spacer } from 'uiSrc/components/base/layout'
1618
import { BaseProps } from '../interfaces'
1719
import { useChangeEditorType } from '../../change-editor-type-button'
1820

@@ -64,8 +66,8 @@ const MonacoEditor = (props: BaseProps) => {
6466
editorWrapperClassName={styles.editorWrapper}
6567
onEditorDidMount={onEditorDidMount}
6668
/>
67-
68-
<EuiFlexItem className={styles.actions}>
69+
<Spacer size="m" />
70+
<Row justify="end" gap="m" className={styles.actions}>
6971
<SecondaryButton
7072
onClick={switchEditorType}
7173
data-testid="json-data-cancel-btn"
@@ -80,7 +82,7 @@ const MonacoEditor = (props: BaseProps) => {
8082
>
8183
Overwrite Data
8284
</PrimaryButton>
83-
</EuiFlexItem>
85+
</Row>
8486
</div>
8587
)
8688
}

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

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
position: relative;
1414

1515
input {
16-
font-family: "Graphik", sans-serif !important;
16+
font-family: 'Graphik', sans-serif !important;
1717
}
1818

1919
:global {
@@ -56,7 +56,7 @@
5656
.jsonData {
5757
font-size: 14px;
5858
line-height: 25px;
59-
font-family: "Inconsolata", monospace !important;
59+
font-family: 'Inconsolata', monospace !important;
6060
letter-spacing: 0.15px;
6161
flex-grow: 1;
6262

@@ -69,7 +69,7 @@
6969
.monacoEditorJsonData {
7070
font-size: 14px;
7171
line-height: 25px;
72-
font-family: "Inconsolata", monospace !important;
72+
font-family: 'Inconsolata', monospace !important;
7373
letter-spacing: 0.15px;
7474
flex-grow: 1;
7575
width: 100%;
@@ -78,7 +78,7 @@
7878
}
7979

8080
.defaultFont {
81-
font-family: "Graphik", sans-serif !important;
81+
font-family: 'Graphik', sans-serif !important;
8282
}
8383

8484
.errorMessage {
@@ -95,7 +95,8 @@
9595
z-index: 2;
9696
display: flex;
9797
align-items: center;
98-
justify-content: center;gap:12px;
98+
justify-content: center;
99+
gap: 12px;
99100
box-shadow: 0 3px 3px var(--controlsBoxShadowColor);
100101

101102
&.controls {
@@ -123,7 +124,7 @@
123124
align-items: center;
124125

125126
&:before {
126-
content: "";
127+
content: '';
127128
display: block;
128129
position: absolute;
129130
height: 100%;
@@ -142,7 +143,9 @@
142143
background: var(--hoverInListColor);
143144
}
144145

145-
> div, span, button {
146+
> div,
147+
span,
148+
button {
146149
z-index: 1;
147150
}
148151
}
@@ -189,7 +192,7 @@
189192
.jsonValue {
190193
font-size: 14px;
191194
line-height: 25px;
192-
font-family: "Inconsolata", monospace;
195+
font-family: 'Inconsolata', monospace;
193196
letter-spacing: 0.15px;
194197
padding: 0 8px;
195198
max-width: 1000px;
@@ -240,7 +243,8 @@
240243
}
241244
}
242245

243-
.actionButtons, .deleteBtn {
246+
.actionButtons,
247+
.deleteBtn {
244248
margin-left: 1em;
245249
display: flex;
246250
align-items: center;
@@ -269,22 +273,8 @@
269273
max-width: none;
270274
}
271275

272-
.actions {
273-
margin-top: 1em;
274-
display: flex;
275-
flex-direction: row !important;
276-
width: 100%;
277-
justify-content: flex-end;
278-
279-
button {
280-
281-
&:first-of-type {
282-
margin-right: 1em;
283-
}
284-
}
285-
}
286-
287-
.editor, .editorWrapper {
276+
.editor,
277+
.editorWrapper {
288278
// Using 100% height starts a weird Monaco animation,
289279
// which causes the editor to overflow its container.
290280
// Probably it's related to the borders of the inside elements.

0 commit comments

Comments
 (0)