Skip to content

Commit 4b51412

Browse files
committed
refactor: remover wrapper div from UploadProgressIndicator
1 parent 225fe94 commit 4b51412

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/components/Loading/UploadProgressIndicator.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import clsx from 'clsx';
21
import React from 'react';
32

43
import { useComponentContext } from '../../context';
@@ -21,9 +20,5 @@ export const UploadProgressIndicator = ({
2120
return <LoadingIndicator data-testid='loading-indicator' />;
2221
}
2322

24-
return (
25-
<div className={clsx('str-chat__attachment-upload-progress')}>
26-
<ProgressIndicator percent={uploadProgress} />
27-
</div>
28-
);
23+
return <ProgressIndicator percent={uploadProgress} />;
2924
};

src/components/Loading/progress-indicators.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const CircularProgressIndicator = ({ percent }: ProgressIndicatorProps) =
1616
const dashOffset = RING_CIRCUMFERENCE * (1 - percent / 100);
1717

1818
return (
19-
<div className='str-chat__circular-progress-indicator'>
19+
<div className='str-chat__circular-progress-indicator str-chat__progress-indicator'>
2020
<svg
2121
aria-label={t('aria/Percent complete', { percent })}
2222
aria-valuemax={100}

src/components/MessageComposer/styling/AttachmentPreview.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
}
212212

213213
.str-chat__loading-indicator,
214-
.str-chat__attachment-upload-progress {
214+
.str-chat__progress-indicator {
215215
width: var(--icon-size-sm);
216216
height: var(--icon-size-sm);
217217
position: absolute;
@@ -284,7 +284,7 @@
284284
line-height: var(--typography-line-height-tight);
285285

286286
.str-chat__loading-indicator,
287-
.str-chat__attachment-upload-progress {
287+
.str-chat__progress-indicator {
288288
width: var(--icon-size-sm);
289289
height: var(--icon-size-sm);
290290
color: var(--accent-primary);

0 commit comments

Comments
 (0)