diff --git a/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/index.scss b/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/index.scss index 7204992ac0e..f921606f955 100644 --- a/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/index.scss +++ b/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/index.scss @@ -50,6 +50,10 @@ overflow: hidden; } +.woocommerce-product-editor-dev-tools-bar__tab-panel { + height: 100%; +} + .woocommerce-product-editor-dev-tools-block-inspector { height: 100%; diff --git a/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/product-editor-dev-tools-bar.tsx b/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/product-editor-dev-tools-bar.tsx index b0b4eca30a8..4bf19104b0e 100644 --- a/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/product-editor-dev-tools-bar.tsx +++ b/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/product-editor-dev-tools-bar.tsx @@ -24,6 +24,7 @@ import { useEntityProp } from '@wordpress/core-data'; import { BlockInspector } from './block-inspector'; import { Help } from './help'; import { Product } from './product'; +import { TabPanel } from './tab-panel'; import { useFocusedBlock } from './hooks/use-focused-block'; function TabButton( { @@ -120,13 +121,15 @@ export function ProductEditorDevToolsBar( {
- { selectedTab === 'inspector' && ( + - ) } - { selectedTab === 'product' && ( + + - ) } - { selectedTab === 'help' && } + + + +
diff --git a/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/tab-panel.tsx b/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/tab-panel.tsx new file mode 100644 index 00000000000..28cd897dc35 --- /dev/null +++ b/plugins/woocommerce-beta-tester/src/product-editor-dev-tools/tab-panel.tsx @@ -0,0 +1,16 @@ +export function TabPanel( { + isSelected, + children, +}: { + isSelected: boolean; + children: React.ReactNode; +} ) { + return ( +
+ { children } +
+ ); +}