refactor: update SidebarSlideOutPanel animation to use width instead of x for smoother transitions

This commit is contained in:
Anish Sarkar 2026-04-09 17:37:31 +05:30
parent a335f7621a
commit abd883458d

View file

@ -91,12 +91,12 @@ export function SidebarSlideOutPanel({
{/* Panel extending from sidebar's right edge, flush with the wrapper border */}
<motion.div
style={{ width, left: "100%", top: -1, bottom: -1 }}
initial={{ x: -width }}
animate={{ x: 0 }}
exit={{ x: -width }}
initial={{ width: 0 }}
animate={{ width }}
exit={{ width: 0 }}
transition={{ type: "tween", duration: 0.2, ease: [0.4, 0, 0.2, 1] }}
className="absolute z-20 overflow-hidden"
style={{ left: "100%", top: -1, bottom: -1 }}
>
<div
style={{ width }}