From 08a51c073777d81b36f7b3e67105985e5d93d608 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Mon, 4 Jul 2022 18:36:52 +0530 Subject: [PATCH] update padding between sidebar items --- src/components/Sidebar/Header.tsx | 2 +- src/components/Sidebar/ShortcutSection.tsx | 4 +-- .../Sidebar/SubscriptionStatus/index.tsx | 2 +- src/components/Sidebar/index.tsx | 30 ++++++++++--------- src/components/Sidebar/styledComponents.tsx | 12 ++------ src/components/Sidebar/userDetailsSection.tsx | 10 +++---- 6 files changed, 26 insertions(+), 34 deletions(-) diff --git a/src/components/Sidebar/Header.tsx b/src/components/Sidebar/Header.tsx index da4eae1eb..f6d1ca041 100644 --- a/src/components/Sidebar/Header.tsx +++ b/src/components/Sidebar/Header.tsx @@ -10,7 +10,7 @@ interface IProps { export default function HeaderSection({ closeSidebar }: IProps) { return ( - + } + startIcon={} label={constants.TRASH} count={collectionSummaries.get(TRASH_SECTION)?.fileCount} onClick={openTrashSection} /> } + startIcon={} label={constants.ARCHIVE_SECTION_NAME} count={collectionSummaries.get(ARCHIVE_SECTION)?.fileCount} onClick={openArchiveSection} diff --git a/src/components/Sidebar/SubscriptionStatus/index.tsx b/src/components/Sidebar/SubscriptionStatus/index.tsx index 1bf7f314b..4531df6a9 100644 --- a/src/components/Sidebar/SubscriptionStatus/index.tsx +++ b/src/components/Sidebar/SubscriptionStatus/index.tsx @@ -45,7 +45,7 @@ export default function SubscriptionStatus({ } return ( - + - + - - - - - - - - - + + + + + + + + + + ); } diff --git a/src/components/Sidebar/styledComponents.tsx b/src/components/Sidebar/styledComponents.tsx index e4a7f35e4..433c9ab0a 100644 --- a/src/components/Sidebar/styledComponents.tsx +++ b/src/components/Sidebar/styledComponents.tsx @@ -1,25 +1,17 @@ -import { Drawer, Divider, styled } from '@mui/material'; +import { Drawer, styled } from '@mui/material'; import CircleIcon from '@mui/icons-material/Circle'; export const DrawerSidebar = styled(Drawer)(({ theme }) => ({ '& .MuiPaper-root': { maxWidth: '375px', width: '100%', - padding: theme.spacing(2, 1, 4, 1), scrollbarWidth: 'thin', + padding: theme.spacing(1.5), }, })); DrawerSidebar.defaultProps = { anchor: 'left' }; -export const PaddedDivider = styled(Divider)<{ - invisible?: boolean; - spaced?: boolean; -}>(({ theme, invisible, spaced }) => ({ - margin: theme.spacing(spaced ? 2 : 1, 0), - opacity: invisible ? 0 : 1, -})); - export const DotSeparator = styled(CircleIcon)` font-size: 4px; margin: 0 ${({ theme }) => theme.spacing(1)}; diff --git a/src/components/Sidebar/userDetailsSection.tsx b/src/components/Sidebar/userDetailsSection.tsx index e2e65b3bf..3eae00d1f 100644 --- a/src/components/Sidebar/userDetailsSection.tsx +++ b/src/components/Sidebar/userDetailsSection.tsx @@ -6,8 +6,7 @@ import { LS_KEYS, setData } from 'utils/storage/localStorage'; import { useLocalState } from 'hooks/useLocalState'; import Typography from '@mui/material/Typography'; import SubscriptionStatus from './SubscriptionStatus'; -import Stack from '@mui/material/Stack'; -import { Skeleton } from '@mui/material'; +import { Box, Skeleton } from '@mui/material'; import { MemberSubscriptionManage } from '../MemberSubscriptionManage'; import { GalleryContext } from 'pages/gallery'; import { isPartOfFamily, isFamilyAdmin } from 'utils/billing'; @@ -53,8 +52,8 @@ export default function UserDetailsSection({ sidebarView }) { return ( <> - - + + {userDetails ? ( userDetails.email ) : ( @@ -67,8 +66,7 @@ export default function UserDetailsSection({ sidebarView }) { onClick={handleSubscriptionCardClick} /> - - + {isMemberSubscription && (