diff --git a/packages/block-editor/src/components/button-block-appender/index.js b/packages/block-editor/src/components/button-block-appender/index.js
index 9cd745ac5eb3d..c4a6854c6d6cc 100644
--- a/packages/block-editor/src/components/button-block-appender/index.js
+++ b/packages/block-editor/src/components/button-block-appender/index.js
@@ -6,7 +6,7 @@ import clsx from 'clsx';
/**
* WordPress dependencies
*/
-import { Button, Tooltip, VisuallyHidden } from '@wordpress/components';
+import { Button } from '@wordpress/components';
import { forwardRef, useRef } from '@wordpress/element';
import { _x, sprintf } from '@wordpress/i18n';
import { Icon, plus } from '@wordpress/icons';
@@ -43,22 +43,22 @@ function ButtonBlockAppender(
blockTitle,
hasSingleBlockType,
} ) => {
- let label;
- if ( hasSingleBlockType ) {
- label = sprintf(
- // translators: %s: the name of the block when there is only one
- _x( 'Add %s', 'directly add the only allowed block' ),
- blockTitle
- );
- } else {
- label = _x(
- 'Add block',
- 'Generic label for block inserter button'
- );
- }
const isToggleButton = ! hasSingleBlockType;
+ const label = hasSingleBlockType
+ ? sprintf(
+ // translators: %s: the name of the block when there is only one
+ _x(
+ 'Add %s',
+ 'directly add the only allowed block'
+ ),
+ blockTitle
+ )
+ : _x(
+ 'Add block',
+ 'Generic label for block inserter button'
+ );
- let inserterButton = (
+ return (
);
-
- if ( isToggleButton || hasSingleBlockType ) {
- inserterButton = (
- { inserterButton }
- );
- }
- return inserterButton;
} }
isAppender
/>