diff --git a/packages/block-editor/src/hooks/dimensions.js b/packages/block-editor/src/hooks/dimensions.js index 02c3931ef9850..084763f0c21b1 100644 --- a/packages/block-editor/src/hooks/dimensions.js +++ b/packages/block-editor/src/hooks/dimensions.js @@ -136,43 +136,3 @@ export function useCustomSides() { version: '6.4', } ); } - -/** - * Custom hook to determine whether the sides configured in the - * block support are valid. A dimension property cannot declare - * support for a mix of axial and individual sides. - * - * @param {string} blockName Block name. - * @param {string} feature The feature custom sides relate to e.g. padding or margins. - * - * @return {boolean} If the feature has a valid configuration of sides. - */ -export function useIsDimensionsSupportValid( blockName, feature ) { - const sides = useCustomSides( blockName, feature ); - - if ( - sides && - sides.some( ( side ) => ALL_SIDES.includes( side ) ) && - sides.some( ( side ) => AXIAL_SIDES.includes( side ) ) - ) { - // eslint-disable-next-line no-console - console.warn( - `The ${ feature } support for the "${ blockName }" block can not be configured to support both axial and arbitrary sides.` - ); - return false; - } - - if ( - sides?.length && - feature === 'blockGap' && - ! AXIAL_SIDES.every( ( side ) => sides.includes( side ) ) - ) { - // eslint-disable-next-line no-console - console.warn( - `The ${ feature } support for the "${ blockName }" block can not be configured to support arbitrary sides.` - ); - return false; - } - - return true; -}