Skip to content

Commit

Permalink
hide lock/unlock buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 18, 2024
1 parent 96dd858 commit 76d6f50
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/block-editor/src/components/block-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export function PrivateBlockToolbar( {
showShuffleButton,
showSlots,
showGroupButtons,
showLockButtons,
} = useSelect( ( select ) => {
const {
getBlockName,
Expand Down Expand Up @@ -139,6 +140,7 @@ export function PrivateBlockToolbar( {
showShuffleButton: isZoomOut(),
showSlots: ! isZoomOut(),
showGroupButtons: ! isZoomOut(),
showLockButtons: ! isZoomOut(),
};
}, [] );

Expand Down Expand Up @@ -199,11 +201,13 @@ export function PrivateBlockToolbar( {
>
<ToolbarGroup className="block-editor-block-toolbar__block-controls">
<BlockSwitcher clientIds={ blockClientIds } />
{ ! isMultiToolbar && isDefaultEditingMode && (
<BlockLockToolbar
clientId={ blockClientId }
/>
) }
{ ! isMultiToolbar &&
isDefaultEditingMode &&
showLockButtons && (
<BlockLockToolbar
clientId={ blockClientId }
/>
) }
<BlockMover
clientIds={ blockClientIds }
hideDragHandle={ hideDragHandle }
Expand Down

0 comments on commit 76d6f50

Please sign in to comment.