Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit "design" controls from Image block toolbar while in write mode #66880

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from
32 changes: 18 additions & 14 deletions packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -745,20 +745,24 @@ export default function Image( {
resetLightbox={ resetLightbox }
/>
) }
{ allowCrop && (
<ToolbarButton
onClick={ () => setIsEditingImage( true ) }
icon={ crop }
label={ __( 'Crop' ) }
/>
) }
{ showCoverControls && (
<ToolbarButton
icon={ overlayText }
label={ __( 'Add text over image' ) }
onClick={ switchToCover }
/>
) }
{ allowCrop &&
! isContentOnlyMode &&
hasNonContentControls && (
up1512001 marked this conversation as resolved.
Show resolved Hide resolved
<ToolbarButton
onClick={ () => setIsEditingImage( true ) }
icon={ crop }
label={ __( 'Crop' ) }
/>
) }
{ showCoverControls &&
! isContentOnlyMode &&
hasNonContentControls && (
up1512001 marked this conversation as resolved.
Show resolved Hide resolved
<ToolbarButton
icon={ overlayText }
label={ __( 'Add text over image' ) }
onClick={ switchToCover }
/>
) }
</BlockControls>
) }
{ isSingleSelected && externalBlob && (
Expand Down
Loading