Skip to content

Commit

Permalink
Post Featured Image: Add the "Reset" button
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Nov 18, 2021
1 parent 8973e2c commit afe4641
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { useEntityProp, store as coreStore } from '@wordpress/core-data';
import { useSelect, useDispatch } from '@wordpress/data';
import {
MenuItem,
ToggleControl,
PanelBody,
Placeholder,
Expand Down Expand Up @@ -168,7 +169,11 @@ function PostFeaturedImageDisplay( {
accept="image/*"
onSelect={ onSelectImage }
onError={ onUploadError }
/>
>
<MenuItem onClick={ () => setFeaturedImage( 0 ) }>
{ __( 'Reset' ) }
</MenuItem>
</MediaReplaceFlow>
</BlockControls>
) }
<figure { ...blockProps }>{ image }</figure>
Expand Down

0 comments on commit afe4641

Please sign in to comment.