Skip to content

Commit

Permalink
Fix some regressions with SideDrawer from #486.
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-mayrgundter committed Nov 25, 2022
1 parent 72aeed2 commit aa29d8c
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/Components/SideDrawer.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useEffect} from 'react'
import {useLocation} from 'react-router-dom'
import Drawer from '@mui/material/Drawer'
import {Box} from '@mui/system'
import {makeStyles, useTheme} from '@mui/styles'
import useStore from '../store/useStore'
import {getHashParams} from '../utils/location'
Expand Down Expand Up @@ -62,17 +63,22 @@ export function SideDrawer({
className={classes.drawer}
>
<div className={classes.content}>
<div
sx={{
height: isPropertiesOn ? '50%' : '100%',
display: isCommentsOn ? '' : 'none',
borderRadius: '0px',
borderBottom: `1px solid ${theme.palette.highlight.heaviest}`,
}}
>
{isCommentsOn ? <NotesPanel/> : null}
</div>
<div className={classes.divider}/>
{isCommentsOn ?
(
<Box
sx={{
height: isPropertiesOn ? '50%' : '100%',
display: isCommentsOn ? 'block' : 'none',
borderRadius: '0px',
borderBottom: `1px solid ${theme.palette.highlight.heaviest}`,
overflowY: 'scroll',
}}
>
<NotesPanel/>
</Box>
) : null
}
{(isCommentsOn && isPropertiesOn) ? <div className={classes.divider}/> : null}
<div className={classes.containerProperties}>
{isPropertiesOn ? <PropertiesPanel/> : null}
</div>
Expand Down Expand Up @@ -170,6 +176,7 @@ const useStyles = makeStyles((theme, props) => (preprocessMediaQuery(MOBILE_WIDT
},
},
content: {
'height': '100%',
'marginTop': '20px',
'display': 'flex',
'flexDirection': 'column',
Expand Down

0 comments on commit aa29d8c

Please sign in to comment.