Skip to content

Commit

Permalink
rename layout.edit to layout.inspectorControls
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Sep 6, 2021
1 parent e359bca commit 7c7315c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) {
) }

{ ! inherit && layoutType && (
<layoutType.edit
<layoutType.inspectorControls
layout={ usedLayout }
onChange={ onChangeLayout }
/>
Expand Down
5 changes: 4 additions & 1 deletion packages/block-editor/src/layouts/flex.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ const justifyContentMap = {
export default {
name: 'flex',
label: __( 'Flex' ),
edit: function FlexLayoutEdit( { layout = {}, onChange } ) {
inspectorControls: function FlexLayoutInspectorControls( {
layout = {},
onChange,
} ) {
return (
<FlexLayoutJustifyContentControl
layout={ layout }
Expand Down
5 changes: 4 additions & 1 deletion packages/block-editor/src/layouts/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import { appendSelectors } from './utils';
export default {
name: 'default',
label: __( 'Flow' ),
edit: function DefaultLayoutEdit( { layout, onChange } ) {
inspectorControls: function DefaultLayoutInspectorControls( {
layout,
onChange,
} ) {
const { wideSize, contentSize } = layout;
const units = useCustomUnits( {
availableUnits: useSetting( 'spacing.units' ) || [
Expand Down

0 comments on commit 7c7315c

Please sign in to comment.