-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove custom button and show single menu on Navigation route
- Loading branch information
Showing
5 changed files
with
62 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...t-site/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
import { decodeEntities } from '@wordpress/html-entities'; | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus'; | ||
import ScreenNavigationMoreMenu from './more-menu'; | ||
import NavigationMenuEditor from './navigation-menu-editor'; | ||
|
||
export default function SingleNavigationMenu( { | ||
navigationMenu, | ||
handleDelete, | ||
handleDuplicate, | ||
handleSave, | ||
} ) { | ||
const menuTitle = navigationMenu?.title?.rendered; | ||
|
||
return ( | ||
<SidebarNavigationScreenWrapper | ||
actions={ | ||
<ScreenNavigationMoreMenu | ||
menuTitle={ decodeEntities( menuTitle ) } | ||
onDelete={ handleDelete } | ||
onSave={ handleSave } | ||
onDuplicate={ handleDuplicate } | ||
/> | ||
} | ||
title={ decodeEntities( menuTitle ) } | ||
description={ __( | ||
'Navigation menus are a curated collection of blocks that allow visitors to get around your site.' | ||
) } | ||
> | ||
<NavigationMenuEditor navigationMenuId={ navigationMenu?.id } /> | ||
</SidebarNavigationScreenWrapper> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
...s/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js
This file was deleted.
Oops, something went wrong.