Skip to content

Commit

Permalink
Use hasItemJustificationCOntrols prop instead of attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed Apr 13, 2021
1 parent 667ce84 commit 9ed9056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions packages/block-library/src/navigation/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
"showSubmenuIcon": {
"type": "boolean",
"default": true
},
"showJustifyControls": {
"type": "boolean",
"default": true
}
},
"providesContext": {
Expand All @@ -44,7 +40,6 @@
"fontSize": "fontSize",
"customFontSize": "customFontSize",
"showSubmenuIcon": "showSubmenuIcon",
"showJustifyControls": "showJustifyControls",
"style": "style",
"orientation": "orientation"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/block-library/src/navigation/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function Navigation( {
updateInnerBlocks,
className,
hasSubmenuIndicatorSetting = true,
hasItemJustificationControls = true,
} ) {
const [ isPlaceholderShown, setIsPlaceholderShown ] = useState(
! hasExistingNavItems
Expand Down Expand Up @@ -119,7 +120,7 @@ function Navigation( {
return (
<>
<BlockControls>
{ attributes.showJustifyControls && (
{ hasItemJustificationControls && (
<JustifyToolbar
value={ attributes.itemsJustification }
allowedControls={ justifyAllowedControls }
Expand Down

0 comments on commit 9ed9056

Please sign in to comment.