From ea8914cb855e3cfeb7489d9601f8567305ad6771 Mon Sep 17 00:00:00 2001 From: sawka Date: Tue, 30 Jul 2024 21:59:20 -0700 Subject: [PATCH] don't apply custom background to previews --- frontend/app/block/block.less | 4 ++++ frontend/app/block/block.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/app/block/block.less b/frontend/app/block/block.less index 00445f572..ee6e6fb1d 100644 --- a/frontend/app/block/block.less +++ b/frontend/app/block/block.less @@ -54,6 +54,10 @@ } } + &.block-preview.block-frame-default .block-frame-default-inner .block-frame-default-header { + background-color: rgba(0, 0, 0, 0.7); + } + &.block-frame-default { position: relative; padding: 2px; diff --git a/frontend/app/block/block.tsx b/frontend/app/block/block.tsx index 0c67f13aa..b5e931773 100644 --- a/frontend/app/block/block.tsx +++ b/frontend/app/block/block.tsx @@ -383,7 +383,7 @@ const BlockFrame_Default_Component = ({ } const innerStyle: React.CSSProperties = {}; - if (customBg?.bg != null) { + if (!preview && customBg?.bg != null) { innerStyle.background = customBg.bg; if (customBg["bg:opacity"] != null) { innerStyle.opacity = customBg["bg:opacity"];