Skip to content

Commit cf5a82a

Browse files
author
Artyom Podymov
committed
#RI-2062 update styles
1 parent 394f8fb commit cf5a82a

File tree

14 files changed

+97
-156
lines changed

14 files changed

+97
-156
lines changed

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/EnablementArea.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ const EnablementArea = ({ items, openScript, loading }: Props) => {
7676
)
7777
case EnablementAreaComponent.CodeButton:
7878
return args?.path
79-
? <LazyCodeButton label={label} {...args} />
80-
: <CodeButton onClick={() => openScript(args?.content || '', '')} label={label} {...args} />
79+
? <div style={{ marginTop: '16px' }}><LazyCodeButton label={label} {...args} /></div>
80+
: <div style={{ marginTop: '16px' }}><CodeButton onClick={() => openScript(args?.content || '', '')} label={label} {...args} /></div>
8181
case EnablementAreaComponent.InternalLink:
8282
return (
8383
<InternalLink testId={id || label} label={label} {...args}>
@@ -91,7 +91,7 @@ const EnablementArea = ({ items, openScript, loading }: Props) => {
9191

9292
const renderTreeView = (elements: IEnablementAreaItem[]) => (
9393
elements?.map((item) => (
94-
<div className={styles.item} key={item.id}>
94+
<div className="fluid" key={item.id}>
9595
{renderSwitch(item)}
9696
</div>
9797
)))

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Carousel/Carousel.spec.tsx

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

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Carousel/Carousel.tsx

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

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Carousel/index.ts

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

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Carousel/styles.module.scss

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

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
.euiAccordion-isOpen {
2121
min-width: 100%;
2222
&.withBorder {
23-
border-color: var(--separatorColor)
23+
border-color: var(--separatorColor);
2424
}
2525
}
2626
.euiAccordion__triggerWrapper, .euiAccordion__childWrapper {
@@ -34,9 +34,15 @@
3434
button {
3535
padding: 3px 8px;
3636
line-height: 24px;
37+
max-height: 30px;
38+
&:hover {
39+
background-color: var(--hoverInListColorLight);
40+
color: var(--euiTextColor)
41+
}
3742
}
3843
.euiListGroupItem__label {
39-
line-height: 20px;
44+
font: normal normal normal 14px/20px Graphik;
45+
letter-spacing: -0.14px;
4046
}
4147
}
4248
}

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/styles.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
overflow: hidden;
3232
text-overflow: ellipsis;
3333
white-space: nowrap;
34+
line-height: 24px;
3435
}

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.tsx

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
import React, { useMemo, useRef, useEffect } from 'react'
22
import {
3-
EuiFlexGroup,
4-
EuiFlexItem,
53
EuiFlyoutHeader,
6-
EuiTitle,
74
EuiText,
8-
EuiButtonIcon,
9-
EuiLoadingContent,
5+
EuiButtonEmpty,
6+
EuiLoadingContent, EuiHorizontalRule,
107
} from '@elastic/eui'
118
import JsxParser from 'react-jsx-parser'
129
import cx from 'classnames'
1310
import { debounce } from 'lodash'
1411

1512
import {
1613
LazyCodeButton,
17-
Carousel,
1814
InternalLink,
1915
Image,
2016
EmptyPrompt, Pagination
@@ -38,7 +34,7 @@ export interface Props {
3834
}
3935
const InternalPage = (props: Props) => {
4036
const { onClose, title, backTitle, isLoading, error, content, onScroll, scrollTop, pagination, id } = props
41-
const components: any = { LazyCodeButton, Carousel, InternalLink, Image }
37+
const components: any = { LazyCodeButton, InternalLink, Image }
4238
const containerRef = useRef<HTMLDivElement>(null)
4339
const handleScroll = debounce(() => {
4440
if (containerRef.current && onScroll) {
@@ -66,28 +62,23 @@ const InternalPage = (props: Props) => {
6662
return (
6763
<div className={styles.container} data-test-subj="internal-page">
6864
<EuiFlyoutHeader className={styles.header}>
69-
<EuiFlexGroup responsive={false} gutterSize="s" alignItems="center">
70-
<EuiFlexItem grow={false}>
71-
<EuiButtonIcon
72-
data-testid="enablement-area__page-close"
73-
iconType="arrowLeft"
74-
onClick={onClose}
75-
aria-label="Back"
76-
/>
77-
</EuiFlexItem>
78-
<EuiFlexItem grow={false}>
79-
<div>
80-
<EuiText size="s" color="subdued" style={{ fontWeight: 'normal' }}>{backTitle}</EuiText>
81-
</div>
82-
</EuiFlexItem>
83-
</EuiFlexGroup>
84-
<EuiFlexGroup style={{ padding: '0 8px' }} responsive={false} gutterSize="s" alignItems="center">
85-
<EuiFlexItem grow={false}>
86-
<EuiTitle>
87-
<EuiText size="s" color="default" style={{ fontWeight: 'normal' }}>{title?.toUpperCase()}</EuiText>
88-
</EuiTitle>
89-
</EuiFlexItem>
90-
</EuiFlexGroup>
65+
<div style={{ padding: 0 }}>
66+
<EuiButtonEmpty
67+
data-testid="enablement-area__page-close"
68+
iconType="arrowLeft"
69+
onClick={onClose}
70+
className={styles.backButton}
71+
aria-label="Back"
72+
>
73+
{backTitle}
74+
</EuiButtonEmpty>
75+
</div>
76+
<div>
77+
<EuiHorizontalRule margin="xs" />
78+
</div>
79+
<div>
80+
<EuiText className={styles.pageTitle} color="default">{title?.toUpperCase()}</EuiText>
81+
</div>
9182
</EuiFlyoutHeader>
9283
<div ref={containerRef} className={cx(styles.content, 'enablement-area__page')} onScroll={handleScroll}>
9384
{ isLoading && <EuiLoadingContent data-testid="enablement-area__page-loader" lines={3} /> }

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/styles.module.scss

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,47 @@
1515
}
1616

1717
.header {
18-
padding: 10px 4px;
18+
padding: 6px 0;
1919
width: 100%;
2020
background-color: var(--euiColorEmptyShade);
21+
& > div {
22+
width: 100%;
23+
padding: 0 18px;
24+
}
2125
}
2226

2327
.footer {
2428
width: 100%;
2529
background-color: var(--euiColorEmptyShade);
2630
}
27-
28-
31+
.pageTitle {
32+
margin: 8px 0 4px;
33+
font: normal normal 500 14px/24px Graphik, sans-serif;
34+
}
35+
.backButton {
36+
padding: 0 4px;
37+
max-height: 30px;
38+
line-height: 24px;
39+
width: 100%;
40+
font: normal normal 14px/24px Graphik, sans-serif !important;
41+
text-decoration: none;
42+
color: var(--euiTextSubduedColor) !important;
43+
& > span {
44+
justify-content: flex-start;
45+
}
46+
&:hover {
47+
background-color: var(--hoverInListColorLight);
48+
color: var(--euiTextColor) !important;
49+
text-decoration: none !important;
50+
}
51+
}
2952
.content {
3053
@include euiScrollBar;
31-
padding: 14px 12px 4px 12px !important;
54+
padding: 8px 12px 4px 18px !important;
3255
overflow: auto;
3356
display: flex;
3457
flex-direction: column;
3558
flex: 1;
3659
}
3760

61+

redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/styles.scss

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1+
@mixin font{
2+
font: normal normal normal 14px/24px Graphik;
3+
letter-spacing: -0.14px;
4+
@media only screen and (max-width: 992px) {
5+
font: normal normal normal 12px/18px Graphik;
6+
letter-spacing: -0.12px;
7+
}
8+
}
9+
110
.enablement-area__page {
211
height: 100%;
3-
font: normal normal normal 12px/18px Graphik;
12+
@include font;
413
letter-spacing: -0.12px;
514

615
h1, h2, h3, h4, h5, h6 {
716
color: var(--euiColorGhost);
8-
font: normal normal medium 12px/16px Graphik;
17+
font: normal normal 500 14px/24px Graphik;
918
margin-bottom: 12px;
10-
letter-spacing: -0.12px;
19+
letter-spacing: 0;
1120
}
1221

1322
p {
@@ -22,7 +31,7 @@
2231
}
2332
}
2433
b, strong {
25-
font: normal normal normal 12px/16px Graphik;
34+
@include font;
2635
letter-spacing: -0.12px;
2736
color: var(--htmlColor);
2837
}

0 commit comments

Comments
 (0)