From 9e3bdebbc37f9abff1cd2756dae77befce6e3ddf Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 12 Dec 2024 11:57:22 +0100 Subject: [PATCH] BoxControl: Better minimum value support (#67819) Co-authored-by: youknowriad Co-authored-by: jorgefilipecosta --- packages/components/CHANGELOG.md | 4 ++++ packages/components/src/box-control/input-control.tsx | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 3525216fcc4322..e8ae2bc7ba6092 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,6 +7,10 @@ - `SelectControl`: Deprecate 36px default size ([#66898](https://github.com/WordPress/gutenberg/pull/66898)). - `InputControl`: Deprecate 36px default size ([#66897](https://github.com/WordPress/gutenberg/pull/66897)). +### Bug Fixes + +- `BoxControl`: Better respect for the `min` prop in the Range Slider ([#67819](https://github.com/WordPress/gutenberg/pull/67819)). + ## 29.0.0 (2024-12-11) ### Breaking Changes diff --git a/packages/components/src/box-control/input-control.tsx b/packages/components/src/box-control/input-control.tsx index 9086cebedc2749..2e1765f518a57d 100644 --- a/packages/components/src/box-control/input-control.tsx +++ b/packages/components/src/box-control/input-control.tsx @@ -78,6 +78,7 @@ export default function BoxInputControl( { setSelectedUnits, sides, side, + min = 0, ...props }: BoxControlInputControlProps ) { const defaultValuesToModify = getSidesToModify( side, sides ); @@ -154,6 +155,7 @@ export default function BoxInputControl( {