From 2f488c5239979669669e360518a24a6bb23481a3 Mon Sep 17 00:00:00 2001 From: George Satellite Date: Sat, 13 Jan 2024 18:28:00 +0200 Subject: [PATCH] noDefaultPrevention: better prop description --- apps/docs/src/app/page.tsx | 2 +- packages/react-knob-headless/src/useKnobKeyboardControl.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/docs/src/app/page.tsx b/apps/docs/src/app/page.tsx index da84d2c..db029ea 100644 --- a/apps/docs/src/app/page.tsx +++ b/apps/docs/src/app/page.tsx @@ -265,7 +265,7 @@ function IndexPage() { type: 'boolean', defaultValue: 'false', description: - 'To prevent scrolling, "event.preventDefault()" is called when the value changes, so for most cases you don\'t need to change this behaviour. However, if your application needs some more customized behaviour, you can set this prop to true and handle it on its own.', + 'To prevent scrolling, "event.preventDefault()" is called when the value changes, but for most cases you don\'t need to change this behaviour. However, if your application needs some more customized one, you can set this prop to true and handle scroll prevention on your own.', }, ]} /> diff --git a/packages/react-knob-headless/src/useKnobKeyboardControl.ts b/packages/react-knob-headless/src/useKnobKeyboardControl.ts index bafe599..6efca8e 100644 --- a/packages/react-knob-headless/src/useKnobKeyboardControl.ts +++ b/packages/react-knob-headless/src/useKnobKeyboardControl.ts @@ -30,8 +30,8 @@ type UseKnobKeyboardControlProps = { ) => void; /** * To prevent scrolling, "event.preventDefault()" is called when the value changes, - * so for most cases you don't need to change this behaviour. - * However, if your application needs some more customized behaviour, you can set this prop to true and handle it on its own. + * but for most cases you don't need to change this behaviour. + * However, if your application needs some more customized one, you can set this prop to true and handle scroll prevention on your own. */ readonly noDefaultPrevention?: boolean; };