Skip to content

Commit

Permalink
Background Image block support: Add reset menu item (#54341)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong authored Sep 12, 2023
1 parent 699819c commit 7d054a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/block-editor/src/hooks/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Button,
DropZone,
FlexItem,
MenuItem,
__experimentalItemGroup as ItemGroup,
__experimentalHStack as HStack,
__experimentalTruncate as Truncate,
Expand Down Expand Up @@ -236,7 +237,13 @@ function BackgroundImagePanelItem( props ) {
/>
}
variant="secondary"
/>
>
<MenuItem
onClick={ () => resetBackgroundImage( props ) }
>
{ __( 'Reset ' ) }
</MenuItem>
</MediaReplaceFlow>
) }
{ ! url && (
<MediaUploadCheck>
Expand Down

0 comments on commit 7d054a2

Please sign in to comment.