diff --git a/docs/advanced/controlled-inputs.md b/docs/advanced/controlled-inputs.md index af1dedf0..80654d48 100644 --- a/docs/advanced/controlled-inputs.md +++ b/docs/advanced/controlled-inputs.md @@ -36,6 +36,7 @@ const data = useControls({ See an [example in Storybook](https://leva.pmnd.rs/?path=/story/misc-input-options--on-change). ### Transient + If you need the `onChange` callback while still wanting to retrieve the input value, you can set `transient: false`. ```jsx @@ -62,16 +63,10 @@ const [, set] = useControls(() => ({ })) const targetRef = useRef() -useDrag( - ({ offset: [x, y] }) => set({ position: { x, y } }), - { domTarget: targetRef } -) +useDrag(({ offset: [x, y] }) => set({ position: { x, y } }), { domTarget: targetRef }) const targetRef = useRef() -useDrag( - ({ offset: [x, y] }) => set({ position: { x, y } }), - { domTarget: targetRef } -) +useDrag(({ offset: [x, y] }) => set({ position: { x, y } }), { domTarget: targetRef }) ``` [codesandbox-drag]: (https://codesandbox.io/s/leva-controlled-input-71dkb?file=/src/App.tsx) diff --git a/docs/configuration.md b/docs/configuration.md index 7a031ead..c751662e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -6,22 +6,20 @@ You can configure Leva by using the `` component anywhere in your App: import { Leva } from 'leva' export default function MyApp() { - return ( <>