From deec609d5411df5827a5a120e7ffe0102733b74e Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Thu, 23 Jul 2026 23:24:48 +0100 Subject: [PATCH] Enhance FileList and ObjectProperty components by adding maxWidth prop for improved layout control. Update rendering logic in FileList to accommodate card and minimal states, ensuring better responsiveness. Adjust PropertyChanges to maintain consistent styling with new width settings. --- src/components/Dashboard/common/FileList.jsx | 121 +++++++++++------- .../Dashboard/common/ObjectProperty.jsx | 2 + .../Dashboard/common/PropertyChanges.jsx | 2 +- 3 files changed, 75 insertions(+), 50 deletions(-) diff --git a/src/components/Dashboard/common/FileList.jsx b/src/components/Dashboard/common/FileList.jsx index a0b2bb8..9919579 100644 --- a/src/components/Dashboard/common/FileList.jsx +++ b/src/components/Dashboard/common/FileList.jsx @@ -24,7 +24,8 @@ const FileList = ({ showDownload = true, defaultPreviewOpen = false, minimal = false, - card = true + card = true, + maxWidth = '100%' }) => { const { fetchFileContent, flushFile } = useContext(ApiServerContext) const navigate = useNavigate() @@ -63,12 +64,23 @@ const FileList = ({ const filesToRender = multiple ? files : [files] const renderFileContent = (file) => ( - + - + @@ -76,50 +88,52 @@ const FileList = ({ {file.name || file.filename || 'Unknown file'} - {file.extension} - - - {showDownload && !minimal && ( -