Skip to content

Commit

Permalink
Fix: use viewportWidth in pattern preview data view (WordPress#60315)
Browse files Browse the repository at this point in the history
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
  • Loading branch information
3 people authored and cbravobernal committed Apr 9, 2024
1 parent 759fb2f commit 2bb1fc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/edit-site/src/components/page-patterns/index.js
Expand Up @@ -171,7 +171,12 @@ function Preview( { item, categoryId, viewType } ) {
>
{ isEmpty && isTemplatePart && __( 'Empty template part' ) }
{ isEmpty && ! isTemplatePart && __( 'Empty pattern' ) }
{ ! isEmpty && <BlockPreview blocks={ item.blocks } /> }
{ ! isEmpty && (
<BlockPreview
blocks={ item.blocks }
viewportWidth={ item.viewportWidth }
/>
) }
</PreviewWrapper>
</div>
{ ariaDescriptions.map( ( ariaDescription, index ) => (
Expand Down

0 comments on commit 2bb1fc7

Please sign in to comment.