Skip to content

Commit

Permalink
Background Image block support: Add reset menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Sep 11, 2023
1 parent ab97d28 commit 2e4f293
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 2e4f293

Please sign in to comment.