[FIX] fix navigation overflow (#7795)
FIX #7733 Fixes the overflow and responsive problem on large and small devices.   The 'Workspace' title is fixed and only links under it are scrolled when overflown. --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -9,10 +9,10 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
||||
|
||||
import { NAV_DRAWER_WIDTHS } from '@/ui/navigation/navigation-drawer/constants/NavDrawerWidths';
|
||||
|
||||
import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';
|
||||
import { isNavigationDrawerExpandedState } from '../../states/isNavigationDrawerExpanded';
|
||||
import { NavigationDrawerBackButton } from './NavigationDrawerBackButton';
|
||||
import { NavigationDrawerHeader } from './NavigationDrawerHeader';
|
||||
import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';
|
||||
|
||||
export type NavigationDrawerProps = {
|
||||
children: ReactNode;
|
||||
@ -22,7 +22,10 @@ export type NavigationDrawerProps = {
|
||||
title?: string;
|
||||
};
|
||||
|
||||
const StyledAnimatedContainer = styled(motion.div)``;
|
||||
const StyledAnimatedContainer = styled(motion.div)`
|
||||
max-height: 100vh;
|
||||
overflow: hidden;
|
||||
`;
|
||||
|
||||
const StyledContainer = styled.div<{
|
||||
isSettings?: boolean;
|
||||
@ -51,6 +54,8 @@ const StyledItemsContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: auto;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
`;
|
||||
|
||||
export const NavigationDrawer = ({
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';
|
||||
import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { AnimationControls, motion, TargetAndTransition } from 'framer-motion';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';
|
||||
|
||||
const StyledAnimatedContainer = styled(motion.div)``;
|
||||
|
||||
|
||||
@ -142,7 +142,6 @@ const StyledKeyBoardShortcut = styled.div`
|
||||
|
||||
const StyledNavigationDrawerItemContainer = styled.div`
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
|
||||
@ -6,6 +6,8 @@ const StyledSection = styled.div`
|
||||
gap: ${({ theme }) => theme.betweenSiblingsGap};
|
||||
width: 100%;
|
||||
margin-bottom: ${({ theme }) => theme.spacing(3)};
|
||||
flex-shrink: 1;
|
||||
overflow: hidden;
|
||||
`;
|
||||
|
||||
export { StyledSection as NavigationDrawerSection };
|
||||
|
||||
Reference in New Issue
Block a user