mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-02-28 10:27:42 +08:00
24 lines
486 B
TypeScript
24 lines
486 B
TypeScript
import { motion } from 'framer-motion'
|
|
import { ease } from '@/web/utils/const'
|
|
|
|
const PageTransition = ({
|
|
children,
|
|
disableEnterAnimation,
|
|
}: {
|
|
children: React.ReactNode
|
|
disableEnterAnimation?: boolean
|
|
}) => {
|
|
return (
|
|
<motion.div
|
|
initial={{ opacity: disableEnterAnimation ? 1 : 0 }}
|
|
animate={{ opacity: 1 }}
|
|
exit={{ opacity: 0 }}
|
|
transition={{ duration: 0.18, ease }}
|
|
>
|
|
{children}
|
|
</motion.div>
|
|
)
|
|
}
|
|
|
|
export default PageTransition
|