Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Limit displayed gallery columns to 4 for viewports < large
  • Loading branch information
mkevins committed Dec 4, 2019
commit 36cd524691bb449a46cab546aad47544155e47ac
4 changes: 3 additions & 1 deletion packages/block-library/src/gallery/gallery.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const Gallery = ( props ) => {
isSelected,
// setAttributes,
isMobile,
isNarrow,
} = props;

const {
Expand All @@ -40,7 +41,8 @@ export const Gallery = ( props ) => {
images,
} = attributes;

const displayedColumns = isMobile ? Math.min( columns, 2 ) : columns;
const displayedColumns = isMobile ? Math.min( columns, 2 ) :
isNarrow ? Math.min( columns, 4 ) : columns;

return (
<View>
Expand Down