update padding between sidebar items
This commit is contained in:
parent
3c0e2f6e03
commit
08a51c0737
|
@ -10,7 +10,7 @@ interface IProps {
|
||||||
|
|
||||||
export default function HeaderSection({ closeSidebar }: IProps) {
|
export default function HeaderSection({ closeSidebar }: IProps) {
|
||||||
return (
|
return (
|
||||||
<SpaceBetweenFlex>
|
<SpaceBetweenFlex mt={0.5} mb={1} px={1.5}>
|
||||||
<EnteLogo />
|
<EnteLogo />
|
||||||
<IconButton
|
<IconButton
|
||||||
aria-label="close"
|
aria-label="close"
|
||||||
|
|
|
@ -30,13 +30,13 @@ export default function ShortcutSection({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ShortcutButton
|
<ShortcutButton
|
||||||
icon={<DeleteIcon />}
|
startIcon={<DeleteIcon />}
|
||||||
label={constants.TRASH}
|
label={constants.TRASH}
|
||||||
count={collectionSummaries.get(TRASH_SECTION)?.fileCount}
|
count={collectionSummaries.get(TRASH_SECTION)?.fileCount}
|
||||||
onClick={openTrashSection}
|
onClick={openTrashSection}
|
||||||
/>
|
/>
|
||||||
<ShortcutButton
|
<ShortcutButton
|
||||||
icon={<VisibilityOffIcon />}
|
startIcon={<VisibilityOffIcon />}
|
||||||
label={constants.ARCHIVE_SECTION_NAME}
|
label={constants.ARCHIVE_SECTION_NAME}
|
||||||
count={collectionSummaries.get(ARCHIVE_SECTION)?.fileCount}
|
count={collectionSummaries.get(ARCHIVE_SECTION)?.fileCount}
|
||||||
onClick={openArchiveSection}
|
onClick={openArchiveSection}
|
||||||
|
|
|
@ -45,7 +45,7 @@ export default function SubscriptionStatus({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box px={1}>
|
<Box px={1} pt={0.5}>
|
||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
color={'text.secondary'}
|
color={'text.secondary'}
|
||||||
|
|
|
@ -5,10 +5,11 @@ import UtilitySection from './UtilitySection';
|
||||||
import HelpSection from './HelpSection';
|
import HelpSection from './HelpSection';
|
||||||
import ExitSection from './ExitSection';
|
import ExitSection from './ExitSection';
|
||||||
import DebugLogs from './DebugLogs';
|
import DebugLogs from './DebugLogs';
|
||||||
import { DrawerSidebar, PaddedDivider } from './styledComponents';
|
import { DrawerSidebar } from './styledComponents';
|
||||||
import HeaderSection from './Header';
|
import HeaderSection from './Header';
|
||||||
import { CollectionSummaries } from 'types/collection';
|
import { CollectionSummaries } from 'types/collection';
|
||||||
import UserDetailsSection from './userDetailsSection';
|
import UserDetailsSection from './userDetailsSection';
|
||||||
|
import { Divider, Stack } from '@mui/material';
|
||||||
|
|
||||||
interface Iprops {
|
interface Iprops {
|
||||||
collectionSummaries: CollectionSummaries;
|
collectionSummaries: CollectionSummaries;
|
||||||
|
@ -23,20 +24,21 @@ export default function Sidebar({
|
||||||
return (
|
return (
|
||||||
<DrawerSidebar open={sidebarView} onClose={closeSidebar}>
|
<DrawerSidebar open={sidebarView} onClose={closeSidebar}>
|
||||||
<HeaderSection closeSidebar={closeSidebar} />
|
<HeaderSection closeSidebar={closeSidebar} />
|
||||||
<PaddedDivider spaced />
|
<Divider />
|
||||||
<UserDetailsSection sidebarView={sidebarView} />
|
<UserDetailsSection sidebarView={sidebarView} />
|
||||||
<PaddedDivider invisible />
|
<Stack spacing={0.5} mb={3}>
|
||||||
<ShortcutSection
|
<ShortcutSection
|
||||||
closeSidebar={closeSidebar}
|
closeSidebar={closeSidebar}
|
||||||
collectionSummaries={collectionSummaries}
|
collectionSummaries={collectionSummaries}
|
||||||
/>
|
/>
|
||||||
<UtilitySection closeSidebar={closeSidebar} />
|
<UtilitySection closeSidebar={closeSidebar} />
|
||||||
<PaddedDivider />
|
<Divider />
|
||||||
<HelpSection />
|
<HelpSection />
|
||||||
<PaddedDivider />
|
<Divider />
|
||||||
<ExitSection />
|
<ExitSection />
|
||||||
<PaddedDivider />
|
<Divider />
|
||||||
<DebugLogs />
|
<DebugLogs />
|
||||||
|
</Stack>
|
||||||
</DrawerSidebar>
|
</DrawerSidebar>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,17 @@
|
||||||
import { Drawer, Divider, styled } from '@mui/material';
|
import { Drawer, styled } from '@mui/material';
|
||||||
import CircleIcon from '@mui/icons-material/Circle';
|
import CircleIcon from '@mui/icons-material/Circle';
|
||||||
|
|
||||||
export const DrawerSidebar = styled(Drawer)(({ theme }) => ({
|
export const DrawerSidebar = styled(Drawer)(({ theme }) => ({
|
||||||
'& .MuiPaper-root': {
|
'& .MuiPaper-root': {
|
||||||
maxWidth: '375px',
|
maxWidth: '375px',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
padding: theme.spacing(2, 1, 4, 1),
|
|
||||||
scrollbarWidth: 'thin',
|
scrollbarWidth: 'thin',
|
||||||
|
padding: theme.spacing(1.5),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
DrawerSidebar.defaultProps = { anchor: 'left' };
|
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)`
|
export const DotSeparator = styled(CircleIcon)`
|
||||||
font-size: 4px;
|
font-size: 4px;
|
||||||
margin: 0 ${({ theme }) => theme.spacing(1)};
|
margin: 0 ${({ theme }) => theme.spacing(1)};
|
||||||
|
|
|
@ -6,8 +6,7 @@ import { LS_KEYS, setData } from 'utils/storage/localStorage';
|
||||||
import { useLocalState } from 'hooks/useLocalState';
|
import { useLocalState } from 'hooks/useLocalState';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import SubscriptionStatus from './SubscriptionStatus';
|
import SubscriptionStatus from './SubscriptionStatus';
|
||||||
import Stack from '@mui/material/Stack';
|
import { Box, Skeleton } from '@mui/material';
|
||||||
import { Skeleton } from '@mui/material';
|
|
||||||
import { MemberSubscriptionManage } from '../MemberSubscriptionManage';
|
import { MemberSubscriptionManage } from '../MemberSubscriptionManage';
|
||||||
import { GalleryContext } from 'pages/gallery';
|
import { GalleryContext } from 'pages/gallery';
|
||||||
import { isPartOfFamily, isFamilyAdmin } from 'utils/billing';
|
import { isPartOfFamily, isFamilyAdmin } from 'utils/billing';
|
||||||
|
@ -53,8 +52,8 @@ export default function UserDetailsSection({ sidebarView }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={1}>
|
<Box px={0.5} mt={2} pb={1.5} mb={1}>
|
||||||
<Typography px={1} color="text.secondary">
|
<Typography px={1} pb={1} color="text.secondary">
|
||||||
{userDetails ? (
|
{userDetails ? (
|
||||||
userDetails.email
|
userDetails.email
|
||||||
) : (
|
) : (
|
||||||
|
@ -67,8 +66,7 @@ export default function UserDetailsSection({ sidebarView }) {
|
||||||
onClick={handleSubscriptionCardClick}
|
onClick={handleSubscriptionCardClick}
|
||||||
/>
|
/>
|
||||||
<SubscriptionStatus userDetails={userDetails} />
|
<SubscriptionStatus userDetails={userDetails} />
|
||||||
</Stack>
|
</Box>
|
||||||
|
|
||||||
{isMemberSubscription && (
|
{isMemberSubscription && (
|
||||||
<MemberSubscriptionManage
|
<MemberSubscriptionManage
|
||||||
userDetails={userDetails}
|
userDetails={userDetails}
|
||||||
|
|
Loading…
Reference in a new issue