Skip to content

Commit

Permalink
change viewportWidth variable to add proper default
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Jul 8, 2024
1 parent 73de85c commit 94c9867
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => {
return getBlockFromExample( name, example );
}, [ name, blockExample, variation ] );

const viewportWidth = blockExample?.viewportWidth ?? null;
const viewportWidth = blockExample?.viewportWidth ?? 500;
// Same as height of InserterPreviewPanel.
const previewHeight = 144;

Expand All @@ -48,7 +48,7 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => {
>
<BlockPreview
blocks={ blocks }
viewportWidth={ viewportWidth ?? 500 }
viewportWidth={ viewportWidth }
minHeight={ previewHeight }
additionalStyles={ [
{
Expand Down

0 comments on commit 94c9867

Please sign in to comment.