Files
hats-app/components/ui/motion-wrapper.tsx
Ichsan Kurniawan ad4925bd55 update UI
2026-04-19 18:54:47 +07:00

17 lines
500 B
TypeScript

// components/motion-wrapper.tsx
"use client";
import { motion } from 'motion/react';
import { ComponentProps } from 'react';
// This automatically extracts every possible prop that motion.div accepts,
// including standard HTML div props (className, onClick, etc.)
type MotionWrapperProps = ComponentProps<typeof motion.div>;
export function MotionDiv({ children, ...props }: MotionWrapperProps) {
return (
<motion.div {...props}>
{children}
</motion.div>
);
}