Skip to content

Commit 97aab9d

Browse files
committed
refactor: DeploymentConfigDiff - css refactor, add prop to hide divider between selectors in header
1 parent b58d82b commit 97aab9d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
}
1919

2020
&__main-content {
21-
height: calc(100vh - 122px);
22-
overflow: auto;
21+
flex-grow: 1;
2322

2423
&__heading {
2524
display: grid;
@@ -39,7 +38,7 @@
3938

4039
&__tab-list {
4140
label {
42-
flex-grow: 1
41+
flex-grow: 1;
4342
}
4443

4544
.radio__item-label {

src/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface DeploymentConfigDiffProps {
6363
selectorsConfig: {
6464
primaryConfig: DeploymentConfigDiffSelectPickerProps[]
6565
secondaryConfig: DeploymentConfigDiffSelectPickerProps[]
66+
hideDivider?: boolean
6667
}
6768
sortingConfig?: {
6869
sortBy: string

src/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export const DeploymentConfigDiffMain = ({
6565
) : (
6666
configItem.text
6767
)}
68-
{index !== list.length - 1 && <span className="cn-9 fs-13 lh-20">/</span>}
68+
{!selectorsConfig?.hideDivider && index !== list.length - 1 && (
69+
<span className="cn-9 fs-13 lh-20">/</span>
70+
)}
6971
</Fragment>
7072
)
7173
}
@@ -74,13 +76,15 @@ export const DeploymentConfigDiffMain = ({
7476

7577
return (
7678
<Fragment key={configItem.id}>
77-
<div className="dc__mxw-300">
79+
<div className="dc__mxw-200">
7880
<SelectPicker<string | number, false>
7981
{...selectPickerProps}
8082
isDisabled={isLoading || selectPickerProps?.isDisabled}
8183
/>
8284
</div>
83-
{index !== list.length - 1 && <span className="cn-9 fs-13 lh-20">/</span>}
85+
{!selectorsConfig?.hideDivider && index !== list.length - 1 && (
86+
<span className="cn-9 fs-13 lh-20">/</span>
87+
)}
8488
</Fragment>
8589
)
8690
})
@@ -170,7 +174,7 @@ export const DeploymentConfigDiffMain = ({
170174
})
171175

172176
return (
173-
<div className="bcn-0 deployment-config-diff__main-top">
177+
<div className="bcn-0 deployment-config-diff__main-top flexbox-col min-h-100">
174178
<div className="dc__border-bottom-n1 flexbox dc__align-items-center dc__position-sticky dc__top-0 bcn-0 w-100 dc__zi-11">
175179
<div className="flexbox dc__align-items-center p-12 dc__gap-8 deployment-config-diff__main-top__header">
176180
<p className="m-0 cn-9 fs-13 lh-20">{headerText}</p>
@@ -183,7 +187,7 @@ export const DeploymentConfigDiffMain = ({
183187
{renderSortButton()}
184188
</div>
185189
</div>
186-
<div className="deployment-config-diff__main-content">
190+
<div className="deployment-config-diff__main-content dc__overflow-y-auto">
187191
{errorConfig?.error && <ErrorScreenManager code={errorConfig.code} reload={errorConfig.reload} />}
188192
{!errorConfig?.error &&
189193
(isLoading ? (

0 commit comments

Comments
 (0)