From bce8fcaf22efa2191c75c20520b86f9daf4ac236 Mon Sep 17 00:00:00 2001 From: feruzm Date: Fri, 8 Mar 2024 08:26:02 +0530 Subject: [PATCH] update step --- .../packages-helpers/react-input-slider-wrapper.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/features/packages-helpers/react-input-slider-wrapper.tsx b/src/common/features/packages-helpers/react-input-slider-wrapper.tsx index 7ea17d1d173..326cdc91619 100644 --- a/src/common/features/packages-helpers/react-input-slider-wrapper.tsx +++ b/src/common/features/packages-helpers/react-input-slider-wrapper.tsx @@ -8,13 +8,14 @@ interface Props { export function ReactInputSliderWrapper({ value, onChange }: Props) { const rootRef = useRef(null); + const step = 0.1; const handleKeyboard = (e: React.KeyboardEvent) => { if (e.key === "ArrowLeft" && value > 0) { - onChange(value - 1); + onChange(value - step); } if (e.key === "ArrowRight" && value < 100) { - onChange(value + 1); + onChange(value + step); } }; @@ -26,7 +27,7 @@ export function ReactInputSliderWrapper({ value, onChange }: Props) { onKeyUp={handleKeyboard} onClick={() => rootRef.current?.focus()} > - onChange(x)} /> + onChange(x)} /> ); }