From 4384d9c942fe5e5e5767fc9c1c9db9b9ad526e6f Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 18 Nov 2021 06:14:21 +0000 Subject: [PATCH] Post Featured Image: Add the "Reset" button (#36572) --- packages/block-library/src/post-featured-image/edit.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/post-featured-image/edit.js b/packages/block-library/src/post-featured-image/edit.js index 0aaff3c717f8df..1b5a93944bbbd9 100644 --- a/packages/block-library/src/post-featured-image/edit.js +++ b/packages/block-library/src/post-featured-image/edit.js @@ -4,6 +4,7 @@ import { useEntityProp, store as coreStore } from '@wordpress/core-data'; import { useSelect, useDispatch } from '@wordpress/data'; import { + MenuItem, ToggleControl, PanelBody, Placeholder, @@ -168,7 +169,11 @@ function PostFeaturedImageDisplay( { accept="image/*" onSelect={ onSelectImage } onError={ onUploadError } - /> + > + setFeaturedImage( 0 ) }> + { __( 'Reset' ) } + + ) }
{ image }