From e180b7c426e1b14c1162b9a71f1f8573fa685f1f Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Wed, 25 Jan 2023 14:08:39 -0500 Subject: [PATCH] Update block-settings-dropdown.js --- .../block-settings-dropdown.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js index def097313e48fe..18cf04d7f1ee02 100644 --- a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js +++ b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js @@ -39,10 +39,11 @@ const POPOVER_PROPS = { variant: 'toolbar', }; -function CopyMenuItem( { blocks, onCopy } ) { +function CopyMenuItem( { blocks, onCopy, label } ) { const ref = useCopyToClipboard( () => serialize( blocks ), onCopy ); - const copyMenuItemLabel = + const copyMenuItemBlocksLabel = blocks.length > 1 ? __( 'Copy blocks' ) : __( 'Copy block' ); + const copyMenuItemLabel = label ? label : copyMenuItemBlocksLabel; return { copyMenuItemLabel }; } @@ -263,9 +264,6 @@ export function BlockSettingsDropdown( { blocks={ blocks } onCopy={ onCopy } /> - - { __( 'Paste styles' ) } - { canDuplicate && ( ) } + + + + { __( 'Paste styles' ) } + +