mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-13 20:10:07 +02:00
23 lines
609 B
TypeScript
23 lines
609 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}>
|
|
{children}
|
|
</motion.main>
|
|
);
|
|
},
|
|
);
|