diff options
Diffstat (limited to 'packages/ui/src/components/motion-spring.tsx')
| -rw-r--r-- | packages/ui/src/components/motion-spring.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ui/src/components/motion-spring.tsx b/packages/ui/src/components/motion-spring.tsx index 5deefcfa6..c7ff1fbcd 100644 --- a/packages/ui/src/components/motion-spring.tsx +++ b/packages/ui/src/components/motion-spring.tsx @@ -1,7 +1,7 @@ import { attachSpring, motionValue } from "motion" import type { SpringOptions } from "motion" import { createEffect, createSignal, onCleanup } from "solid-js" -import { prefersReducedMotion } from "../hooks/use-reduced-motion" +import { useReducedMotion } from "../hooks/use-reduced-motion" type Opt = Pick<SpringOptions, "visualDuration" | "bounce" | "stiffness" | "damping" | "mass" | "velocity"> const eq = (a: Opt | undefined, b: Opt | undefined) => @@ -14,7 +14,7 @@ const eq = (a: Opt | undefined, b: Opt | undefined) => export function useSpring(target: () => number, options?: Opt | (() => Opt)) { const read = () => (typeof options === "function" ? options() : options) - const reduce = prefersReducedMotion + const reduce = useReducedMotion() const [value, setValue] = createSignal(target()) const source = motionValue(value()) const spring = motionValue(value()) |
