diff --git a/packages/edit-post/src/components/header/header-toolbar/index.js b/packages/edit-post/src/components/header/header-toolbar/index.js index f3e16a6f2b398..6334791036c25 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -23,7 +23,6 @@ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; /** * Internal dependencies */ -import TemplateTitle from '../template-title'; import { store as editPostStore } from '../../../store'; const preventDefault = ( event ) => { @@ -164,8 +163,6 @@ function HeaderToolbar() { ) } - - ); } diff --git a/packages/edit-post/src/components/header/index.js b/packages/edit-post/src/components/header/index.js index c24e41ec59b41..40e5fa91239e0 100644 --- a/packages/edit-post/src/components/header/index.js +++ b/packages/edit-post/src/components/header/index.js @@ -21,6 +21,7 @@ import PostPublishButtonOrToggle from './post-publish-button-or-toggle'; import { default as DevicePreview } from '../device-preview'; import MainDashboardButton from './main-dashboard-button'; import { store as editPostStore } from '../../store'; +import TemplateTitle from './template-title'; function Header( { setEntitiesSavedStatesCallback } ) { const { @@ -59,6 +60,7 @@ function Header( { setEntitiesSavedStatesCallback } ) {
+
{ ! isPublishSidebarOpened && ( diff --git a/packages/edit-post/src/components/header/template-title/index.js b/packages/edit-post/src/components/header/template-title/index.js index a2cd8b0ca07f7..21431ee1e319c 100644 --- a/packages/edit-post/src/components/header/template-title/index.js +++ b/packages/edit-post/src/components/header/template-title/index.js @@ -3,7 +3,7 @@ */ import { __, sprintf } from '@wordpress/i18n'; import { useSelect, useDispatch } from '@wordpress/data'; -import { Dropdown, ToolbarItem, Button } from '@wordpress/components'; +import { Dropdown, Button } from '@wordpress/components'; import { chevronDown } from '@wordpress/icons'; /** @@ -47,59 +47,50 @@ function TemplateTitle() { } return ( - - { ( toolbarItemHTMLProps ) => { - return ( - ( - <> - - - +
+ + ( + + ) } + renderContent={ () => ( + <> + { template.has_theme_file ? ( + + ) : ( + ) } - renderContent={ () => ( - <> - { template.has_theme_file ? ( - - ) : ( - - ) } - - - ) } - /> - ); - } } - + + + ) } + /> +
); }