Skip to content

Commit

Permalink
remove layout attribute and specify default in settings instead
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Sep 6, 2023
1 parent a35bf3b commit 1373042
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Create and save content to reuse across your site. Update the pattern, and the c
- **Name:** core/block
- **Category:** reusable
- **Supports:** ~~customClassName~~, ~~html~~, ~~inserter~~
- **Attributes:** layout, ref
- **Attributes:** ref

## Button

Expand Down
6 changes: 0 additions & 6 deletions packages/block-library/src/block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
"attributes": {
"ref": {
"type": "number"
},
"layout": {
"type": "array",
"default": {
"type": "constrained"
}
}
},
"supports": {
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function addEditorOnlyLayoutSupportForPatterns( blockSettings ) {
blockSettings.supports.layout = {
allowSizingOnChildren: true,
allowEditing: false,
default: {
type: 'constrained',
},
};
}

Expand Down

0 comments on commit 1373042

Please sign in to comment.