diff --git a/packages/block-editor/src/layouts/flex.js b/packages/block-editor/src/layouts/flex.js index c67ebc17a785d..f57ccbde46616 100644 --- a/packages/block-editor/src/layouts/flex.js +++ b/packages/block-editor/src/layouts/flex.js @@ -66,24 +66,27 @@ export default { onChange, layoutBlockSupport = {}, } ) { - const { allowOrientation = true } = layoutBlockSupport; + const { allowOrientation = true, allowJustification = true } = + layoutBlockSupport; return ( <> - - - - - { allowOrientation && ( + { allowJustification && ( + + + + ) } + { allowOrientation && ( + - ) } - + + ) } @@ -94,14 +97,22 @@ export default { onChange, layoutBlockSupport, } ) { - const { allowVerticalAlignment = true } = layoutBlockSupport; + const { allowVerticalAlignment = true, allowJustification = true } = + layoutBlockSupport; + + if ( ! allowJustification && ! allowVerticalAlignment ) { + return null; + } + return ( - + { allowJustification && ( + + ) } { allowVerticalAlignment && (