From a5c3dc6bb52a85ab4bc712c27031ba53e35978fb Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:53:08 +0900 Subject: [PATCH] Global Styles: fix console error in block preview (#59112) Co-authored-by: t-hamano Co-authored-by: Mamaduka Co-authored-by: annezazu Co-authored-by: carolinan --- .../src/components/global-styles/block-preview-panel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/block-preview-panel.js b/packages/edit-site/src/components/global-styles/block-preview-panel.js index 24bd2e666eab3e..787d8c6d47e500 100644 --- a/packages/edit-site/src/components/global-styles/block-preview-panel.js +++ b/packages/edit-site/src/components/global-styles/block-preview-panel.js @@ -28,7 +28,7 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => { }, [ name, blockExample, variation ] ); const viewportWidth = blockExample?.viewportWidth ?? null; - const previewHeight = '150px'; + const previewHeight = 150; if ( ! blockExample ) { return null; @@ -48,7 +48,7 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => { { css: ` body{ - min-height:${ previewHeight }; + min-height:${ previewHeight }px; display:flex;align-items:center;justify-content:center; } `,