"use client"; import { motion, useInView } from "framer-motion"; import { useRef, type ReactNode } from "react"; type Props = { text: string; className?: string; delayOffset?: number; suffix?: ReactNode; suffixClassName?: string; }; export function WordsPullUp({ text, className, delayOffset = 0, suffix, suffixClassName }: Props) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: "0px 0px -10% 0px" }); const words = text.split(" "); return ( {words.map((word, i) => ( {word} {suffix && i === words.length - 1 ? ( {suffix} ) : null} ))} ); }