From c2cf277c8d7eea01a820f65a95ed9a99ab4fce0e Mon Sep 17 00:00:00 2001 From: dhruvang21 Date: Tue, 26 Nov 2024 14:02:42 +0530 Subject: [PATCH] Remove the CSS styles for the create new post link and CreateNewPostLink component --- .../create-new-post-link.js | 32 ------------------- packages/block-library/src/query/editor.scss | 4 --- 2 files changed, 36 deletions(-) delete mode 100644 packages/block-library/src/query/edit/inspector-controls/create-new-post-link.js diff --git a/packages/block-library/src/query/edit/inspector-controls/create-new-post-link.js b/packages/block-library/src/query/edit/inspector-controls/create-new-post-link.js deleted file mode 100644 index 58d58a6089aacd..00000000000000 --- a/packages/block-library/src/query/edit/inspector-controls/create-new-post-link.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * WordPress dependencies - */ -import { createInterpolateElement } from '@wordpress/element'; -import { addQueryArgs } from '@wordpress/url'; -import { store as coreStore } from '@wordpress/core-data'; -import { useSelect } from '@wordpress/data'; - -const CreateNewPostLink = ( { postType } ) => { - const newPostUrl = addQueryArgs( 'post-new.php', { - post_type: postType, - } ); - - const addNewItemLabel = useSelect( - ( select ) => { - const { getPostType } = select( coreStore ); - return getPostType( postType )?.labels?.add_new_item; - }, - [ postType ] - ); - return ( -
- { createInterpolateElement( - '' + addNewItemLabel + '', - // eslint-disable-next-line jsx-a11y/anchor-has-content - { a: } - ) } -
- ); -}; - -export default CreateNewPostLink; diff --git a/packages/block-library/src/query/editor.scss b/packages/block-library/src/query/editor.scss index b86eae0cbf65a8..da863bff0b5da6 100644 --- a/packages/block-library/src/query/editor.scss +++ b/packages/block-library/src/query/editor.scss @@ -6,10 +6,6 @@ } } -.wp-block-query__create-new-link { - padding: 0 $grid-unit-20 $grid-unit-20 52px; -} - .block-library-query__pattern-selection-content .block-editor-block-patterns-list { display: grid; grid-template-columns: 1fr 1fr 1fr;