From 3b090c707bf69821ae4e8f2e5337caa8d07acdb1 Mon Sep 17 00:00:00 2001 From: u8array Date: Tue, 5 May 2026 22:40:38 +0200 Subject: [PATCH] feat(labelary-preview): inset background and overflow scrolling for oversized labels --- src/components/Output/LabelPreview.tsx | 60 +++++++++++++------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/components/Output/LabelPreview.tsx b/src/components/Output/LabelPreview.tsx index e34d5f56..6c0b71f9 100644 --- a/src/components/Output/LabelPreview.tsx +++ b/src/components/Output/LabelPreview.tsx @@ -51,10 +51,10 @@ export function LabelPreviewModal({ onClose }: Props) { onClick={onClose} >
e.stopPropagation()} > -
+
{t.output.previewHeading} @@ -66,33 +66,35 @@ export function LabelPreviewModal({ onClose }: Props) {
-
- {loading && ( - {t.output.loading} - )} - {!loading && error && ( -
- {error} - -
- )} - {!loading && !error && previewUrl && ( - Label preview - )} + {/* Inset preview area: bg-bg gives a clear edge against the surrounding + surface (especially in light mode where the label image is white). + The outer div scrolls; the inner one stays at least as large as the + viewport so small previews are still centered. */} +
+
+ {loading && ( + {t.output.loading} + )} + {!loading && error && ( +
+ {error} + +
+ )} + {!loading && !error && previewUrl && ( + Label preview + )} +