summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v1/layout/square.js')
-rw-r--r--plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v1/layout/square.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v1/layout/square.js b/plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v1/layout/square.js
deleted file mode 100644
index 2a1ab888..00000000
--- a/plugins/jetpack/extensions/blocks/tiled-gallery/deprecated/v1/layout/square.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * External dependencies
- */
-import { chunk, drop, take } from 'lodash';
-
-/**
- * Internal dependencies
- */
-import Row from './row';
-import Column from './column';
-import Gallery from './gallery';
-import { MAX_COLUMNS } from '../constants';
-
-export default function Square( { columns, renderedImages } ) {
- const columnCount = Math.min( MAX_COLUMNS, columns );
-
- const remainder = renderedImages.length % columnCount;
-
- return (
- <Gallery>
- { [
- ...( remainder ? [ take( renderedImages, remainder ) ] : [] ),
- ...chunk( drop( renderedImages, remainder ), columnCount ),
- ].map( ( imagesInRow, rowIndex ) => (
- <Row key={ rowIndex } className={ `columns-${ imagesInRow.length }` }>
- { imagesInRow.map( ( image, colIndex ) => (
- <Column key={ colIndex }>{ image }</Column>
- ) ) }
- </Row>
- ) ) }
- </Gallery>
- );
-}