Skip to content

Commit 2498aa7

Browse files
Copilotastandrik
andcommitted
feat: remove unused width prop from ProgressViewer and MemoryViewer components
Co-authored-by: astandrik <[email protected]>
1 parent 7310b9f commit 2498aa7

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

src/components/MemoryViewer/MemoryViewer.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ $memory-type-colors: (
1919
min-width: 150px;
2020
padding: 0 var(--g-spacing-1);
2121

22-
&_width_full {
23-
width: 100%;
24-
min-width: 40px;
25-
}
26-
2722
&__progress-container {
2823
position: relative;
2924

src/components/MemoryViewer/MemoryViewer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export interface MemoryProgressViewerProps {
4343
dangerThreshold?: number;
4444
formatValues: FormatProgressViewerValues;
4545
percents?: boolean;
46-
width?: 'full';
4746
}
4847

4948
export function MemoryViewer({
@@ -53,7 +52,6 @@ export function MemoryViewer({
5352
className,
5453
warningThreshold,
5554
dangerThreshold,
56-
width,
5755
}: MemoryProgressViewerProps) {
5856
const memoryUsage = stats.AnonRss ?? calculateAllocatedMemory(stats);
5957

@@ -136,7 +134,7 @@ export function MemoryViewer({
136134
</DefinitionList>
137135
)}
138136
>
139-
<div className={b({theme, status, width}, className)}>
137+
<div className={b({theme, status}, className)}>
140138
<div className={b('progress-container')}>
141139
{memorySegments
142140
.filter(({isInfo}) => !isInfo)

src/components/ProgressViewer/ProgressViewer.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
border-radius: 2px;
2323
background: var(--g-color-base-generic);
2424

25-
&_width_full {
26-
width: 100%;
27-
min-width: 40px;
28-
}
29-
3025
&_theme_dark {
3126
color: var(--g-color-text-light-primary);
3227

src/components/ProgressViewer/ProgressViewer.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export interface ProgressViewerProps {
3939
dangerThreshold?: number;
4040
hideCapacity?: boolean;
4141
withOverflow?: boolean;
42-
width?: 'full';
4342
}
4443

4544
export function ProgressViewer({
@@ -55,7 +54,6 @@ export function ProgressViewer({
5554
warningThreshold,
5655
dangerThreshold,
5756
hideCapacity,
58-
width,
5957
}: ProgressViewerProps) {
6058
const theme = useTheme();
6159

@@ -99,12 +97,12 @@ export function ProgressViewer({
9997

10098
if (isNumeric(value)) {
10199
return (
102-
<div className={b({size, theme, status, width}, className)}>
100+
<div className={b({size, theme, status}, className)}>
103101
<div className={b('line')} style={lineStyle}></div>
104102
<span className={b('text')}>{renderContent()}</span>
105103
</div>
106104
);
107105
}
108106

109-
return <div className={b({size, width}, className)}>{EMPTY_DATA_PLACEHOLDER}</div>;
107+
return <div className={b({size}, className)}>{EMPTY_DATA_PLACEHOLDER}</div>;
110108
}

0 commit comments

Comments
 (0)