diff --git a/packages/block-editor/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js b/packages/block-editor/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js index 7fc96caa7fd47..4a24482f3b1e4 100644 --- a/packages/block-editor/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +++ b/packages/block-editor/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js @@ -10,7 +10,7 @@ import useSetting from '../../use-setting'; export default function useSpacingSizes() { const spacingSizes = [ - { name: 0, slug: '0', side: 0 }, + { name: 0, slug: '0', size: 0 }, ...( useSetting( 'spacing.spacingSizes' ) || [] ), ]; diff --git a/packages/block-editor/src/components/spacing-sizes-control/utils.js b/packages/block-editor/src/components/spacing-sizes-control/utils.js index fe8d89509cdbd..340abb0322e9a 100644 --- a/packages/block-editor/src/components/spacing-sizes-control/utils.js +++ b/packages/block-editor/src/components/spacing-sizes-control/utils.js @@ -102,7 +102,7 @@ export function getCustomValueFromPreset( value, spacingSizes ) { */ export function getPresetValueFromCustomValue( value, spacingSizes ) { // Return value as-is if it is already a preset; - if ( isValueSpacingPreset( value ) ) { + if ( isValueSpacingPreset( value ) || value === '0' ) { return value; }