"use client"; import { useRef, memo } from "react"; import { useCharAnimation } from "../useCharAnimation"; import { useButtonClick } from "../useButtonClick"; import { cls } from "@/lib/utils"; import "./BounceButton.css"; interface ButtonBounceEffectProps { text: string; onClick?: () => void; href?: string; className?: string; bgClassName?: string; textClassName?: string; disabled?: boolean; ariaLabel?: string; type?: "button" | "submit" | "reset"; } const ButtonBounceEffect = ({ text, onClick, href, className = "", bgClassName = "", textClassName = "", disabled = false, ariaLabel, type = "button", }: ButtonBounceEffectProps) => { const buttonRef = useRef(null); const handleClick = useButtonClick(href, onClick); useCharAnimation(buttonRef, text); return ( ); }; ButtonBounceEffect.displayName = "ButtonBounceEffect"; export default memo(ButtonBounceEffect);