Files
ember-market-frontend/components/ui/motion-wrapper.tsx
g 5d9f8fa07b
All checks were successful
Build Frontend / build (push) Successful in 1m17s
Redesign auth pages and enhance analytics UI with motion
Refactored login and registration pages for a modern, consistent look with animated backgrounds and improved form feedback. Enhanced analytics dashboard and metrics cards with framer-motion animations and visual polish. Updated MotionWrapper for flexible motion props and improved transitions. Minor UI/UX improvements and code cleanup throughout auth and analytics components.
2026-01-12 04:06:36 +00:00

31 lines
864 B
TypeScript

"use client";
import { motion, HTMLMotionProps } from "framer-motion";
import { cn } from "@/lib/utils";
import { forwardRef } from "react";
interface MotionWrapperProps extends HTMLMotionProps<"div"> {
children: React.ReactNode;
className?: string;
}
export const MotionWrapper = forwardRef<HTMLDivElement, MotionWrapperProps>(
({ children, className, ...props }, ref) => {
return (
<motion.div
ref={ref}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
transition={{ duration: 0.4, ease: "easeOut" }}
className={cn(className)}
{...props}
>
{children}
</motion.div>
);
}
);
MotionWrapper.displayName = "MotionWrapper";