Merge pull request #1171 from SohamBhattacharjee2003/fix/use-transform-for-sidebar-animation

fix: use transform for sidebar animation
This commit is contained in:
Rohan Verma 2026-04-07 23:39:07 -07:00 committed by GitHub
commit 387e517fda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,12 +91,13 @@ export function SidebarSlideOutPanel({
{/* Panel extending from sidebar's right edge, flush with the wrapper border */}
<motion.div
initial={{ width: 0 }}
animate={{ width }}
exit={{ width: 0 }}
style={{ width }}
initial={{ x: -width }}
animate={{ x: 0 }}
exit={{ x: -width }}
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 }}
style={{ width, left: "100%", top: -1, bottom: -1 }}
>
<div
style={{ width }}