From 1dfe264422edb472e8ee3525f3cfd4b3c0b0c67f Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Fri, 28 Aug 2020 11:55:08 +1000 Subject: [PATCH] Address remaining feedback and style fixes. --- packages/components/src/dropdown-menu/index.js | 2 +- .../edit-post/src/components/header/header-toolbar/index.js | 4 ++-- packages/edit-post/src/components/header/style.scss | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/components/src/dropdown-menu/index.js b/packages/components/src/dropdown-menu/index.js index 2525939403799d..c9c22dc726bca0 100644 --- a/packages/components/src/dropdown-menu/index.js +++ b/packages/components/src/dropdown-menu/index.js @@ -129,7 +129,7 @@ function DropdownMenu( { aria-haspopup="true" aria-expanded={ isOpen } label={ label } - showTooltip={ toggleProps?.showTooltip ?? true } + showTooltip={ !! toggleProps?.showTooltip } > { mergedToggleProps.children } 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 498b3bd08d1d12..fa83a588e8976d 100644 --- a/packages/edit-post/src/components/header/header-toolbar/index.js +++ b/packages/edit-post/src/components/header/header-toolbar/index.js @@ -179,11 +179,11 @@ function HeaderToolbar() { choices={ [ { value: 'edit', - label: <>{ __( 'Edit' ) }, + label: __( 'Edit' ), }, { value: 'select', - label: <>{ __( 'Select' ) }, + label: __( 'Select' ), }, ] } /> diff --git a/packages/edit-post/src/components/header/style.scss b/packages/edit-post/src/components/header/style.scss index a180eaba63e787..931dcde9c9e39d 100644 --- a/packages/edit-post/src/components/header/style.scss +++ b/packages/edit-post/src/components/header/style.scss @@ -174,9 +174,13 @@ } .components-dropdown-menu__toggle { margin-left: $grid-unit; + padding-left: $grid-unit; + padding-right: $grid-unit; @include break-small { margin-left: $grid-unit-15; + padding-left: $grid-unit-15; + padding-right: $grid-unit-15; } } // The inserter has a custom label, different from its aria-label, so we don't want to display both. @@ -199,6 +203,7 @@ } .edit-post-header__dropdown { + .components-menu-item__button.components-menu-item__button, .components-button.editor-history__undo, .components-button.editor-history__redo, .table-of-contents .components-button,