Tune guest route transition animations
This commit is contained in:
@@ -72,17 +72,17 @@ export default function RouteTransition({ children }: { children?: React.ReactNo
|
||||
};
|
||||
|
||||
const tabVariants = {
|
||||
enter: { opacity: 0, scale: 0.985 },
|
||||
center: { opacity: 1, scale: 1 },
|
||||
exit: { opacity: 0, scale: 0.985 },
|
||||
enter: { opacity: 0, y: 8 },
|
||||
center: { opacity: 1, y: 0 },
|
||||
exit: { opacity: 0, y: -8 },
|
||||
};
|
||||
|
||||
const transition = kind === 'tab'
|
||||
? { duration: 0.18, ease: [0.22, 0.61, 0.36, 1] }
|
||||
: { duration: 0.24, ease: [0.25, 0.8, 0.25, 1] };
|
||||
? { duration: 0.22, ease: [0.22, 0.61, 0.36, 1] }
|
||||
: { duration: 0.28, ease: [0.25, 0.8, 0.25, 1] };
|
||||
|
||||
return (
|
||||
<AnimatePresence initial={false}>
|
||||
<AnimatePresence initial={false} mode="wait">
|
||||
<motion.div
|
||||
key={location.pathname}
|
||||
custom={{ direction }}
|
||||
|
||||
Reference in New Issue
Block a user