"use client"; import { motion } from "framer-motion"; import * as React from "react"; import { cn } from "@turbostarter/ui"; import type {Variants} from "framer-motion"; interface TextShimmerProps { children: string; className?: string; duration?: number; spread?: number; } function TextShimmer({ children, className, duration = 2, spread = 2, }: TextShimmerProps) { const dynamicSpread = React.useMemo(() => spread, [spread]); const variants: Variants = React.useMemo(() => { return { initial: { backgroundPosition: "100% center", }, animate: { backgroundPosition: "0% center", }, }; }, []); return ( {children} ); } export { TextShimmer };