"use client"; import * as React from "react"; import { motion, useReducedMotion } from "motion/react"; import { cn } from "@/lib/utils"; /** Tasteful entrance animation on scroll. Renders static markup when the user prefers reduced motion. */ export function Reveal({ children, className, delay = 0, as = "div", y = 14, }: { children: React.ReactNode; className?: string; delay?: number; as?: "div" | "section" | "li" | "span" | "p" | "h1" | "h2"; y?: number; }) { const reduce = useReducedMotion(); const Comp = motion[as]; if (reduce) { const Static = as; return {children}; } return ( {children} ); }