diff --git a/packages/block-editor/src/components/inspector-controls-tabs/index.js b/packages/block-editor/src/components/inspector-controls-tabs/index.js
index de192050d05cb2..944ce6f3220937 100644
--- a/packages/block-editor/src/components/inspector-controls-tabs/index.js
+++ b/packages/block-editor/src/components/inspector-controls-tabs/index.js
@@ -1,7 +1,10 @@
/**
* WordPress dependencies
*/
-import { TabPanel } from '@wordpress/components';
+import {
+ Button,
+ privateApis as componentsPrivateApis,
+} from '@wordpress/components';
/**
* Internal dependencies
@@ -11,6 +14,9 @@ import SettingsTab from './settings-tab';
import StylesTab from './styles-tab';
import InspectorControls from '../inspector-controls';
import useIsListViewTabDisabled from './use-is-list-view-tab-disabled';
+import { unlock } from '../../lock-unlock';
+
+const { Tabs } = unlock( componentsPrivateApis );
export default function InspectorControlsTabs( {
blockName,
@@ -26,34 +32,39 @@ export default function InspectorControlsTabs( {
const initialTabName = ! useIsListViewTabDisabled( blockName )
? TAB_LIST_VIEW.name
: undefined;
- return (
-
- { ( tab ) => {
- if ( tab.name === TAB_SETTINGS.name ) {
- return (
-
- );
- }
- if ( tab.name === TAB_STYLES.name ) {
- return (
-
+
+
+ { tabs.map( ( tab ) => (
+
+ }
/>
- );
- }
-
- if ( tab.name === TAB_LIST_VIEW.name ) {
- return ;
- }
- } }
-
+ ) ) }
+
+
+
+
+
+
+
+
+
+
+
+
);
}
diff --git a/packages/block-editor/src/components/inspector-controls-tabs/style.scss b/packages/block-editor/src/components/inspector-controls-tabs/style.scss
index da83073a45590a..6db9395af62ef6 100644
--- a/packages/block-editor/src/components/inspector-controls-tabs/style.scss
+++ b/packages/block-editor/src/components/inspector-controls-tabs/style.scss
@@ -1,5 +1,5 @@
.show-icon-labels {
- .block-editor-block-inspector__tabs .components-tab-panel__tabs {
+ .block-editor-block-inspector__tabs [role="tablist"] {
.components-button.has-icon {
// Hide the button icons when labels are set to display...
svg {