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