"use client"; import React, { useRef } from "react"; import { motion } from "motion/react"; import { useParallax } from "@/lib/scroll"; type ParallaxProps = { speed?: number; // positive moves with scroll, negative opposite axis?: "y" | "x"; className?: string; children?: React.ReactNode; } & React.ComponentProps; export function Parallax({ speed = 0.2, axis = "y", className, children, ...rest }: ParallaxProps) { const localRef = useRef(null!); const style = useParallax(localRef, speed, axis); return ( {children} ); }