"use client"; import { cn } from "../../src/lib/utils"; import { motion } from "motion/react"; import { type ElementType, type JSX, memo, } from "react"; export interface TextShimmerProps { children: string; as?: ElementType; className?: string; duration?: number; spread?: number; } const ShimmerComponent = ({ children, as: Component = "p", className, duration = 2, }: TextShimmerProps) => { const MotionComponent = motion.create( Component as keyof JSX.IntrinsicElements ); return ( {children} ); }; export const Shimmer = memo(ShimmerComponent);