File tree Expand file tree Collapse file tree 5 files changed +7
-28
lines changed
src/components/MessageComposer Expand file tree Collapse file tree 5 files changed +7
-28
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,17 @@ import { ProgressIndicator as DefaultProgressIndicator } from '../../Loading';
55import { useComponentContext } from '../../../context' ;
66import { LoadingIndicatorIcon } from '../icons' ;
77
8- export type AttachmentUploadProgressVariant = 'inline' | 'overlay' ;
9-
108export type AttachmentUploadProgressIndicatorProps = {
119 className ?: string ;
1210 /** Shown when `uploadProgress` is `undefined` (e.g. progress tracking disabled). */
1311 fallback ?: ReactNode ;
1412 uploadProgress ?: number ;
15- variant : AttachmentUploadProgressVariant ;
1613} ;
1714
1815export const AttachmentUploadProgressIndicator = ( {
1916 className,
2017 fallback,
2118 uploadProgress,
22- variant,
2319} : AttachmentUploadProgressIndicatorProps ) => {
2420 const { ProgressIndicator = DefaultProgressIndicator } = useComponentContext ( ) ;
2521
@@ -28,13 +24,7 @@ export const AttachmentUploadProgressIndicator = ({
2824 }
2925
3026 return (
31- < div
32- className = { clsx (
33- 'str-chat__attachment-upload-progress' ,
34- `str-chat__attachment-upload-progress--${ variant } ` ,
35- className ,
36- ) }
37- >
27+ < div className = { clsx ( 'str-chat__attachment-upload-progress' , className ) } >
3828 < ProgressIndicator percent = { uploadProgress } />
3929 </ div >
4030 ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import clsx from 'clsx';
1010import { AttachmentUploadProgressIndicator } from './AttachmentUploadProgressIndicator' ;
1111import { RemoveAttachmentPreviewButton } from '../RemoveAttachmentPreviewButton' ;
1212import { AttachmentPreviewRoot } from './utils/AttachmentPreviewRoot' ;
13- import { FileSizeIndicator } from '../../Attachment' ;
1413import { IconExclamationMark , IconExclamationTriangleFill } from '../../Icons' ;
1514import { PlayButton } from '../../Button' ;
1615import {
@@ -95,10 +94,7 @@ export const AudioAttachmentPreview = ({
9594 </ div >
9695 < div className = 'str-chat__attachment-preview-file__data' >
9796 { uploadState === 'uploading' && (
98- < AttachmentUploadProgressIndicator
99- uploadProgress = { uploadProgress }
100- variant = 'inline'
101- />
97+ < AttachmentUploadProgressIndicator uploadProgress = { uploadProgress } />
10298 ) }
10399 { showProgressControls ? (
104100 < >
Original file line number Diff line number Diff line change @@ -43,10 +43,7 @@ export const FileAttachmentPreview = ({
4343 </ div >
4444 < div className = 'str-chat__attachment-preview-file__data' >
4545 { uploadState === 'uploading' && (
46- < AttachmentUploadProgressIndicator
47- uploadProgress = { uploadProgress }
48- variant = 'inline'
49- />
46+ < AttachmentUploadProgressIndicator uploadProgress = { uploadProgress } />
5047 ) }
5148 < AttachmentUploadedSizeIndicator attachment = { attachment } />
5249 { hasFatalError && (
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ export const MediaAttachmentPreview = ({
100100 < AttachmentUploadProgressIndicator
101101 fallback = { < LoadingIndicator /> }
102102 uploadProgress = { uploadProgress }
103- variant = 'overlay'
104103 />
105104 ) }
106105
Original file line number Diff line number Diff line change 215215 }
216216
217217 .str-chat__loading-indicator ,
218- .str-chat__attachment-upload-progress.str-chat__attachment-upload-progress--overlay ,
218+ .str-chat__attachment-upload-progress ,
219219 .str-chat__icon--exclamation-circle {
220220 width : var (--icon-size-sm );
221221 height : var (--icon-size-sm );
241241 color : var (--badge-text-on-accent );
242242 }
243243
244- .str-chat__attachment-upload-progress.str-chat__attachment-upload-progress--overlay {
244+ .str-chat__attachment-upload-progress {
245245 border : none ;
246246 border-radius : 0 ;
247+ background : transparent ;
247248 }
248249 }
249250
295296 line-height : var (--typography-line-height-tight );
296297
297298 .str-chat__loading-indicator ,
298- .str-chat__attachment-upload-progress.str-chat__attachment-upload-progress--inline {
299+ .str-chat__attachment-upload-progress {
299300 width : var (--icon-size-sm );
300301 height : var (--icon-size-sm );
301302 }
302303
303- .str-chat__attachment-upload-progress.str-chat__attachment-upload-progress--inline {
304- flex-shrink : 0 ;
305- }
306-
307304 .str-chat__attachment-preview-file__upload-size-fraction {
308305 white-space : nowrap ;
309306 }
You can’t perform that action at this time.
0 commit comments