Skip to content

Commit

Permalink
Off switch for layout classes in inner wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Oct 26, 2022
1 parent e87b92b commit 4074881
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const ForwardedInnerBlocks = forwardRef( ( props, ref ) => {
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md
*/
export function useInnerBlocksProps( props = {}, options = {} ) {
const { __experimentalLayout } = options;
const { __unstableNoLayoutClassNames } = options;
const { clientId, __unstableLayoutClassNames: layoutClassNames = '' } =
useBlockEditContext();
const isSmallScreen = useViewportMatch( 'medium', '<' );
Expand Down Expand Up @@ -209,9 +209,9 @@ export function useInnerBlocksProps( props = {}, options = {} ) {
className: classnames(
props.className,
'block-editor-block-list__layout',
__unstableNoLayoutClassNames ? '' : layoutClassNames,
{
'has-overlay': hasOverlay,
[ layoutClassNames ]: __experimentalLayout,
}
),
children: clientId ? (
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/group/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function GroupEdit( {
? undefined
: InnerBlocks.ButtonBlockAppender,
__experimentalLayout: layoutSupportEnabled ? usedLayout : undefined,
__unstableNoLayoutClassNames: ! layoutSupportEnabled,
}
);

Expand Down

0 comments on commit 4074881

Please sign in to comment.