From f179d6e12c51fe29e5540feee0c9c2f0bcdb64f7 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 18 Jun 2021 11:25:15 +0100 Subject: [PATCH] Allow left/right/center alignments when a layout is defined --- packages/block-library/src/group/edit.js | 2 +- packages/block-library/src/post-content/edit.js | 2 +- packages/block-library/src/query/edit/index.js | 2 +- packages/block-library/src/template-part/edit/inner-blocks.js | 2 +- packages/edit-post/src/components/visual-editor/index.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/group/edit.js b/packages/block-library/src/group/edit.js index 4814c173afe7a8..cc7a14c7cf7712 100644 --- a/packages/block-library/src/group/edit.js +++ b/packages/block-library/src/group/edit.js @@ -34,7 +34,7 @@ function GroupEdit( { attributes, setAttributes, clientId } ) { if ( themeSupportsLayout ) { const alignments = contentSize || wideSize - ? [ 'wide', 'full' ] + ? [ 'wide', 'full', 'left', 'center', 'right' ] : [ 'left', 'center', 'right' ]; return { type: 'default', diff --git a/packages/block-library/src/post-content/edit.js b/packages/block-library/src/post-content/edit.js index 9283b120057b36..537181c6b8cd83 100644 --- a/packages/block-library/src/post-content/edit.js +++ b/packages/block-library/src/post-content/edit.js @@ -51,7 +51,7 @@ function EditableContent( { layout, context = {} } ) { if ( themeSupportsLayout ) { const alignments = contentSize || wideSize - ? [ 'wide', 'full' ] + ? [ 'wide', 'full', 'left', 'center', 'right' ] : [ 'left', 'center', 'right' ]; return { type: 'default', diff --git a/packages/block-library/src/query/edit/index.js b/packages/block-library/src/query/edit/index.js index 637f05c18a1be5..44bd64a9988d5a 100644 --- a/packages/block-library/src/query/edit/index.js +++ b/packages/block-library/src/query/edit/index.js @@ -49,7 +49,7 @@ export function QueryContent( { attributes, setAttributes } ) { if ( themeSupportsLayout ) { const alignments = contentSize || wideSize - ? [ 'wide', 'full' ] + ? [ 'wide', 'full', 'left', 'center', 'right' ] : [ 'left', 'center', 'right' ]; return { type: 'default', diff --git a/packages/block-library/src/template-part/edit/inner-blocks.js b/packages/block-library/src/template-part/edit/inner-blocks.js index ae25b10bf401a9..48a85a69227ff1 100644 --- a/packages/block-library/src/template-part/edit/inner-blocks.js +++ b/packages/block-library/src/template-part/edit/inner-blocks.js @@ -29,7 +29,7 @@ export default function TemplatePartInnerBlocks( { if ( themeSupportsLayout ) { const alignments = contentSize || wideSize - ? [ 'wide', 'full' ] + ? [ 'wide', 'full', 'left', 'center', 'right' ] : [ 'left', 'center', 'right' ]; return { type: 'default', diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index f4b89f28679179..9e7fab084badef 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -178,7 +178,7 @@ export default function VisualEditor( { styles } ) { if ( themeSupportsLayout ) { const alignments = contentSize || wideSize - ? [ 'wide', 'full' ] + ? [ 'wide', 'full', 'left', 'center', 'right' ] : [ 'left', 'center', 'right' ]; return { type: 'default',