From b0730366fe25888a99606434b1d3d1ce0f90be77 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 22 Feb 2023 10:10:02 +0100 Subject: [PATCH] Disable dimensions panel on native --- .../global-styles/dimensions-panel.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/block-editor/src/components/global-styles/dimensions-panel.js b/packages/block-editor/src/components/global-styles/dimensions-panel.js index 662dc41487955..a2657a4fc72e8 100644 --- a/packages/block-editor/src/components/global-styles/dimensions-panel.js +++ b/packages/block-editor/src/components/global-styles/dimensions-panel.js @@ -18,7 +18,7 @@ import { __experimentalView as View, } from '@wordpress/components'; import { Icon, layout, positionCenter, stretchWide } from '@wordpress/icons'; -import { useCallback } from '@wordpress/element'; +import { useCallback, Platform } from '@wordpress/element'; /** * Internal dependencies @@ -41,13 +41,14 @@ export function useHasDimensionsPanel( settings ) { const hasChildLayout = useHasChildLayout( settings ); return ( - hasContentSize || - hasWideSize || - hasPadding || - hasMargin || - hasGap || - hasMinHeight || - hasChildLayout + Platform.OS === 'web' && + ( hasContentSize || + hasWideSize || + hasPadding || + hasMargin || + hasGap || + hasMinHeight || + hasChildLayout ) ); }