mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-11 14:10:50 +02:00
fix(ui): keep workspace CSV previews within the tab height
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
b7da00cc00
commit
4c85bb424a
2 files changed
+2
-2
No files matched your search
@@ -64,7 +64,7 @@ export function TextAttachmentPreview({ title, text, markdown, downloadUrl, csv
|
||||
</Button>
|
||||
</header>
|
||||
<div className={csv && !raw ? "flex min-h-0 flex-1 flex-col overflow-hidden" : "min-h-0 flex-1 overflow-auto p-4"}>
|
||||
{text.length === 0 ? <p className="text-sm text-muted-foreground">File is empty.</p>
|
||||
{text.length === 0 ? <p className="p-4 text-sm text-muted-foreground">File is empty.</p>
|
||||
: csv && !raw ? <CsvPreview text={text} title={title} />
|
||||
: markdown && !raw ? <MarkdownBody mediaMode="reference">{text}</MarkdownBody>
|
||||
: <pre className="whitespace-pre-wrap break-words font-mono text-sm" aria-label={`${title} raw text`}>{text}</pre>}
|
||||
|
||||
@@ -90,7 +90,7 @@ export function TaskWorkspaceFilePanel({
|
||||
) : null}
|
||||
</div>
|
||||
</header>
|
||||
<div className="min-h-0 flex-1 overflow-hidden">
|
||||
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
<div className="sr-only" aria-live="polite">{announcement}</div>
|
||||
<FileViewerBody
|
||||
previewMode={previewMode}
|
||||
|
||||
Reference in new issue
Block a user