@@ -59,28 +59,33 @@ const ModalFooter: React.FC<ModalFooterProps> = ({
59
59
cancelUpload,
60
60
isPaused,
61
61
uploadingCount,
62
- } ) => (
63
- < div className = "w-full flex flex-wrap bg-[#F0F2F3] text-black p-4 items-center justify-between" >
64
- < div className = "w-full flex flex-wrap gap-2 justify-center sm:justify-end" >
65
- { uploadingCount > 0 && (
62
+ } ) => {
63
+ const pauseResumeBtnTestId = isPaused ( ) ? 'testid:upload-root-modal-pause' : 'testid:upload-root-modal-resume' ;
64
+ const cancelCloseBtnTestId = uploadingCount ? 'testid:upload-root-modal-cancel' : 'testid:upload-root-modal-close' ;
65
+
66
+ return (
67
+ < div className = "w-full flex flex-wrap bg-[#F0F2F3] text-black p-4 items-center justify-between" >
68
+ < div className = "w-full flex flex-wrap gap-2 justify-center sm:justify-end" >
69
+ { uploadingCount > 0 && (
70
+ < button
71
+ className = { `text-blue-500 px-4 py-2 rounded bg-transparent transition-all duration-300 ease-in-out
72
+ hover:bg-blue-600 hover:text-white w-full sm:w-auto ${ pauseResumeBtnTestId } ` }
73
+ onClick = { pauseOrResumeUpload }
74
+ >
75
+ { isPaused ( ) ? Languages . t ( 'general.resume' ) : Languages . t ( 'general.pause' ) }
76
+ </ button >
77
+ ) }
66
78
< button
67
- className = " text-blue-500 px-4 py-2 rounded bg-transparent transition-all duration-300 ease-in-out
68
- hover:bg-blue-600 hover:text-white w-full sm:w-auto testid:upload-root-modal-pause-resume"
69
- onClick = { pauseOrResumeUpload }
79
+ className = { ` text-blue-500 min-w-[100px] px-4 py-2 rounded bg-transparent transition-all duration-300 ease-in-out
80
+ hover:bg-blue-600 hover:text-white w-full sm:w-auto ${ cancelCloseBtnTestId } ` }
81
+ onClick = { cancelUpload }
70
82
>
71
- { isPaused ( ) ? Languages . t ( 'general.resume ' ) : Languages . t ( 'general.pause ' ) }
83
+ { uploadingCount ? Languages . t ( 'general.cancel ' ) : Languages . t ( 'general.close ' ) }
72
84
</ button >
73
- ) }
74
- < button
75
- className = "text-blue-500 min-w-[100px] px-4 py-2 rounded bg-transparent transition-all duration-300 ease-in-out
76
- hover:bg-blue-600 hover:text-white w-full sm:w-auto testid:upload-root-modal-cancel-close"
77
- onClick = { cancelUpload }
78
- >
79
- { uploadingCount ? Languages . t ( 'general.cancel' ) : Languages . t ( 'general.close' ) }
80
- </ button >
85
+ </ div >
81
86
</ div >
82
- </ div >
83
- ) ;
87
+ ) ;
88
+ }
84
89
85
90
const PendingRootList = ( {
86
91
roots,
0 commit comments