diff --git a/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx b/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx index 4e989d0c..ba4868d5 100644 --- a/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx +++ b/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx @@ -17,16 +17,18 @@ const AttachmentPreview: FC = ({ files, setFiles }) => { return ( - ({ - uid: file.id, - url: 'file://' + FileManager.getSafePath(file), - status: 'done', - name: file.name - }))} - onRemove={(item) => setFiles(files.filter((file) => item.uid !== file.id))} - /> + + 20 ? 'text' : 'picture-card'} + fileList={files.map((file) => ({ + uid: file.id, + url: 'file://' + FileManager.getSafePath(file), + status: 'done', + name: file.name + }))} + onRemove={(item) => setFiles(files.filter((file) => item.uid !== file.id))} + /> + ) } @@ -35,9 +37,16 @@ const Container = styled.div` display: flex; flex-direction: row; gap: 10px; - padding: 10px 20px; + padding: 10px 0; background: var(--color-background); border-top: 1px solid var(--color-border-mute); ` +const ContentContainer = styled.div` + max-height: 40vh; + width: 100%; + overflow-y: auto; + padding: 0 20px; +` + export default AttachmentPreview