import { motion } from 'framer-motion'; import { useWindowSize } from 'usehooks-ts'; interface AnimatedButtonProps { type?: 'button' | 'submit'; onClick?: () => void; className?: string; children: React.ReactNode; } export default function AnimatedButton({ type = 'button', onClick, className = '', children, }: AnimatedButtonProps) { const { width } = useWindowSize(); const isMobile = width ? width < 768 : false; return ( {children} {!isMobile && ( <> ⌘+
)}
); }