Skip to content

Commit 812c84d

Browse files
final changes for file upload error notification
1 parent 9757b4d commit 812c84d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/frontend/src/components/uploadButton.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -547,18 +547,23 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
547547

548548
<div style={{ display: 'flex', flexDirection: 'column', gap: '13px', width: '837px', paddingBottom: 10, borderRadius: '4px', }}>
549549
{/* Show file rejection errors for invalid type or size */}
550-
{fileRejectionErrors.length > 0 && (
550+
{fileRejectionErrors.length > 0 && (
551551
<MessageBar
552552
messageBarType={MessageBarType.error}
553553
isMultiline={true}
554-
styles={{ root: { display: "flex", alignItems: "left", background: "#fff4f4", width: "inherit" } }}
554+
styles={{
555+
root: { display: "flex", flexDirection: "column", alignItems: "left", background: "#fff4f4" },
556+
icon: { display: "none" },
557+
}}
555558
>
556-
<div style={{ display: "flex", flexDirection: "column", alignItems: "left" }}>
557-
{fileRejectionErrors.map((err, idx) => (
558-
<span key={idx} style={{ marginBottom: "4px" }}>{err}</span>
559+
<div style={{ display: "flex", alignItems: "center" }}>
560+
<X strokeWidth="2.5px" color="#d83b01" size="16px" style={{ marginRight: "8px" }} />
561+
<span>{fileRejectionErrors[0]}</span>
562+
</div>
563+
{fileRejectionErrors.slice(1).map((err, idx) => (
564+
<div key={idx} style={{ marginLeft: "24px", marginTop: "2px" }}>{err}</div>
559565
))}
560-
</div>
561-
</MessageBar>
566+
</MessageBar>
562567
)}
563568
{/* Show network error message bar if any file has error */}
564569
{uploadingFiles.some(f => f.status === 'error') && (

0 commit comments

Comments
 (0)