Skip to content

Commit

Permalink
Buttons Block: Fix for orientation-based block movers (WordPress#51831)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored and sethrubenstein committed Jul 13, 2023
1 parent 11acc81 commit d196edb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/buttons/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DEFAULT_BLOCK = {
};

function ButtonsEdit( { attributes, className } ) {
const { fontSize, style } = attributes;
const { fontSize, layout, style } = attributes;
const blockProps = useBlockProps( {
className: classnames( className, {
'has-custom-font-size': fontSize || style?.typography?.fontSize,
Expand All @@ -59,8 +59,8 @@ function ButtonsEdit( { attributes, className } ) {
{ className: preferredStyle && `is-style-${ preferredStyle }` },
],
],

templateInsertUpdatesSelection: true,
orientation: layout?.orientation ?? 'horizontal',
} );

return <div { ...innerBlocksProps } />;
Expand Down

0 comments on commit d196edb

Please sign in to comment.