From 45ab6f776d684748262bb5c35fc17ecb8977b5ec Mon Sep 17 00:00:00 2001 From: Utsav Patel Date: Fri, 8 Nov 2024 00:26:07 +0530 Subject: [PATCH] Revert "feature: add consistant illustrator to media text block" This reverts commit 2f2f6fbc19af7784d07d0d82db99e6c3f552cf5c. --- .../src/media-text/media-container.js | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/packages/block-library/src/media-text/media-container.js b/packages/block-library/src/media-text/media-container.js index 73eb0f3c557b8..735aaf73b88aa 100644 --- a/packages/block-library/src/media-text/media-container.js +++ b/packages/block-library/src/media-text/media-container.js @@ -15,7 +15,7 @@ import { store as blockEditorStore, } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; -import { useViewportMatch, useResizeObserver } from '@wordpress/compose'; +import { useViewportMatch } from '@wordpress/compose'; import { useDispatch } from '@wordpress/data'; import { forwardRef } from '@wordpress/element'; import { isBlobURL } from '@wordpress/blob'; @@ -76,7 +76,6 @@ function PlaceholderContainer( { mediaUrl, onSelectMedia, toggleUseFeaturedImage, - isSelected, } ) { const { createErrorNotice } = useDispatch( noticesStore ); @@ -84,14 +83,12 @@ function PlaceholderContainer( { createErrorNotice( message, { type: 'snackbar' } ); }; - const [ placeholderResizeListener, { width: placeholderWidth } ] = - useResizeObserver(); - - const isSmallContainer = placeholderWidth && placeholderWidth < 160; - return ( } + labels={ { + title: __( 'Media area' ), + } } className={ className } onSelect={ onSelectMedia } accept="image/*,video/*" @@ -99,20 +96,6 @@ function PlaceholderContainer( { allowedTypes={ ALLOWED_MEDIA_TYPES } onError={ onUploadError } disableMediaButtons={ mediaUrl } - placeholder={ ( content ) => ( - - { content } - { placeholderResizeListener } - - ) } /> ); }