Fix navbar animation layout shift (#2335)

fix navbar animation
This commit is contained in:
brendanlaschke
2023-11-03 11:04:30 +01:00
committed by GitHub
parent f19ed5e2e4
commit e3691ad143
3 changed files with 3 additions and 8 deletions

View File

@ -50,7 +50,7 @@ const NavCollapseButton = ({
return (
<>
<StyledCollapseButton
initial={{ opacity: show ? 1 : 0 }}
initial={false}
animate={{
opacity: show ? 1 : 0,
}}

View File

@ -48,7 +48,7 @@ export const NavbarAnimatedContainer = ({
onAnimationComplete={() => {
setIsNavbarSwitchingSize(false);
}}
initial={{ width: isNavbarOpened ? leftBarWidth : '0' }}
initial={false}
animate={{
width: isNavbarOpened ? leftBarWidth : '0',
opacity: isNavbarOpened ? 1 : 0,