From 3ff94bb856bd9586c1c207e2f61eabd26c6dba60 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 10 Nov 2021 14:36:10 +0100 Subject: [PATCH 1/2] Navigation: Refactor and simplify setup state. --- .../src/navigation/edit/placeholder/index.js | 58 ++++++++++--------- .../block-library/src/navigation/editor.scss | 39 +++++++------ .../components/src/placeholder/style.scss | 8 +++ 3 files changed, 60 insertions(+), 45 deletions(-) diff --git a/packages/block-library/src/navigation/edit/placeholder/index.js b/packages/block-library/src/navigation/edit/placeholder/index.js index 2c7155fdf81c1..73645d496ea66 100644 --- a/packages/block-library/src/navigation/edit/placeholder/index.js +++ b/packages/block-library/src/navigation/edit/placeholder/index.js @@ -13,7 +13,7 @@ import { store as coreStore } from '@wordpress/core-data'; import { useDispatch } from '@wordpress/data'; import { useCallback, useState, useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { navigation, chevronDown, Icon } from '@wordpress/icons'; +import { navigation, Icon } from '@wordpress/icons'; /** * Internal dependencies @@ -34,13 +34,14 @@ const ExistingMenusDropdown = ( { onCreateFromMenu, } ) => { const toggleProps = { - variant: 'primary', + variant: 'tertiary', + iconPosition: 'right', className: 'wp-block-navigation-placeholder__actions__dropdown', }; return ( @@ -201,32 +202,35 @@ export default function NavigationPlaceholder( { { ' ' } { __( 'Navigation' ) } +
{ hasMenus || navigationMenus.length ? ( - + <> + +
+ ) : undefined } { hasPages ? ( - + <> + +
+ ) : undefined }