diff --git a/components/object/preview-modal.tsx b/components/object/preview-modal.tsx index e2030cbb..3a44c00a 100644 --- a/components/object/preview-modal.tsx +++ b/components/object/preview-modal.tsx @@ -457,34 +457,26 @@ export function ObjectPreviewModal({ show, onShowChange, onDownload, object }: O } as React.CSSProperties } > - - {t("Preview")} + + {t("Preview")} + +
- - - } - > - - + } + > + + +
{renderPreview()}
diff --git a/tests/lib/object-preview-source.test.js b/tests/lib/object-preview-source.test.js index 63da1171..bb05a654 100644 --- a/tests/lib/object-preview-source.test.js +++ b/tests/lib/object-preview-source.test.js @@ -114,6 +114,26 @@ test("object preview dialog provides a keyboard-operable expand and collapse alt assert.match(source, /"--preview-dialog-width": "min\(56rem, calc\(100vw - 2rem\)\)"/) }) +test("object preview dialog places Expand next to Close instead of underneath it", () => { + const source = fs.readFileSync("components/object/preview-modal.tsx", "utf8") + + assert.match( + source, + /
\s*\s*]*>\s*]*>\{t\("Preview"\)\}<\/DialogTitle>\s*