mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
27 lines
728 B
TypeScript
27 lines
728 B
TypeScript
import type { ReactNode, Ref } from 'react';
|
|
|
|
import { motion } from 'motion/react';
|
|
import { forwardRef } from 'react';
|
|
|
|
import styles from './animated-page.module.css';
|
|
|
|
import { animationProps } from '/@/shared/components/animations/animation-props';
|
|
|
|
interface AnimatedPageProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
export const AnimatedPage = forwardRef(
|
|
({ children }: AnimatedPageProps, ref: Ref<HTMLDivElement>) => {
|
|
return (
|
|
<motion.main
|
|
className={styles.animatedPage}
|
|
ref={ref}
|
|
{...{ ...animationProps.fadeIn, transition: { duration: 0.5, ease: 'anticipate' } }}
|
|
>
|
|
{children}
|
|
</motion.main>
|
|
);
|
|
},
|
|
);
|