@ -39,16 +39,11 @@ const StyledLayout = styled.div`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const NAVBAR_WIDTH = '236px';
|
|
||||||
|
|
||||||
const StyledMainContainer = styled.div`
|
const StyledMainContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: ${() =>
|
|
||||||
useRecoilValue(isNavbarOpenedState)
|
|
||||||
? `calc(100% - ${NAVBAR_WIDTH})`
|
|
||||||
: '100%'};
|
|
||||||
@media (max-width: ${MOBILE_VIEWPORT}px) {
|
@media (max-width: ${MOBILE_VIEWPORT}px) {
|
||||||
width: ${() => (useRecoilValue(isNavbarOpenedState) ? '0' : '100%')};
|
width: ${() => (useRecoilValue(isNavbarOpenedState) ? '0' : '100%')};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ const NavCollapseButton = ({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StyledCollapseButton
|
<StyledCollapseButton
|
||||||
initial={{ opacity: show ? 1 : 0 }}
|
initial={false}
|
||||||
animate={{
|
animate={{
|
||||||
opacity: show ? 1 : 0,
|
opacity: show ? 1 : 0,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export const NavbarAnimatedContainer = ({
|
|||||||
onAnimationComplete={() => {
|
onAnimationComplete={() => {
|
||||||
setIsNavbarSwitchingSize(false);
|
setIsNavbarSwitchingSize(false);
|
||||||
}}
|
}}
|
||||||
initial={{ width: isNavbarOpened ? leftBarWidth : '0' }}
|
initial={false}
|
||||||
animate={{
|
animate={{
|
||||||
width: isNavbarOpened ? leftBarWidth : '0',
|
width: isNavbarOpened ? leftBarWidth : '0',
|
||||||
opacity: isNavbarOpened ? 1 : 0,
|
opacity: isNavbarOpened ? 1 : 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user