From f46a4d5e9bf9f5fca7a18c99af3dedff509652b8 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 4 Nov 2021 10:19:41 +0100 Subject: [PATCH] [Block: Group] Transform to row variation --- packages/block-library/src/group/variations.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/group/variations.js b/packages/block-library/src/group/variations.js index 55b3a0c9fc5d4c..b1d0748b55c452 100644 --- a/packages/block-library/src/group/variations.js +++ b/packages/block-library/src/group/variations.js @@ -4,12 +4,21 @@ import { __ } from '@wordpress/i18n'; const variations = [ + { + name: 'group', + title: __( 'Group' ), + description: __( 'Blocks shown in a column.' ), + attributes: { layout: { type: 'default' } }, + scope: [ 'inserter', 'transform' ], + isActive: ( blockAttributes ) => + blockAttributes.layout?.type === 'default', + }, { name: 'group-row', title: __( 'Row' ), description: __( 'Blocks shown in a row.' ), attributes: { layout: { type: 'flex', allowOrientation: false } }, - scope: [ 'inserter' ], + scope: [ 'inserter', 'transform' ], isActive: ( blockAttributes ) => blockAttributes.layout?.type === 'flex', },