diff --git a/packages/block-editor/src/hooks/margin.js b/packages/block-editor/src/hooks/margin.js index 19ea51dc1ff9b..06d86c85345fc 100644 --- a/packages/block-editor/src/hooks/margin.js +++ b/packages/block-editor/src/hooks/margin.js @@ -143,7 +143,6 @@ export function MarginEdit( props ) { units={ units } allowReset={ false } splitOnAxis={ splitOnAxis } - allowNegativeValues={ true } /> ), diff --git a/packages/components/src/box-control/index.js b/packages/components/src/box-control/index.js index a6744f420ac47..cbd11e1995435 100644 --- a/packages/components/src/box-control/index.js +++ b/packages/components/src/box-control/index.js @@ -46,7 +46,7 @@ function useUniqueId( idProp ) { } export default function BoxControl( { id: idProp, - inputProps, + inputProps = defaultInputProps, onChange = noop, label = __( 'Box Control' ), values: valuesProp, @@ -55,10 +55,7 @@ export default function BoxControl( { splitOnAxis = false, allowReset = true, resetValues = DEFAULT_VALUES, - allowNegativeValues = false, } ) { - inputProps = allowNegativeValues ? { min: -Infinity } : defaultInputProps; - const [ values, setValues ] = useControlledState( valuesProp, { fallback: DEFAULT_VALUES, } );