diff --git a/packages/block-library/src/buttons/edit.js b/packages/block-library/src/buttons/edit.js index 7b1243ccb47da6..913daf0f92e0c0 100644 --- a/packages/block-library/src/buttons/edit.js +++ b/packages/block-library/src/buttons/edit.js @@ -20,6 +20,17 @@ import { name as buttonBlockName } from '../button'; const ALLOWED_BLOCKS = [ buttonBlockName ]; const BUTTONS_TEMPLATE = [ [ 'core/button' ] ]; +const LAYOUT = { + type: 'default', + alignments: [], +}; +const VERTICAL_JUSTIFY_CONTROLS = [ 'left', 'center', 'right' ]; +const HORIZONTAL_JUSTIFY_CONTROLS = [ + 'left', + 'center', + 'right', + 'space-between', +]; function ButtonsEdit( { attributes: { contentJustification, orientation }, @@ -35,17 +46,14 @@ function ButtonsEdit( { allowedBlocks: ALLOWED_BLOCKS, template: BUTTONS_TEMPLATE, orientation, - __experimentalLayout: { - type: 'default', - alignments: [], - }, + __experimentalLayout: LAYOUT, templateInsertUpdatesSelection: true, } ); const justifyControls = orientation === 'vertical' - ? [ 'left', 'center', 'right' ] - : [ 'left', 'center', 'right', 'space-between' ]; + ? VERTICAL_JUSTIFY_CONTROLS + : HORIZONTAL_JUSTIFY_CONTROLS; return ( <>