Skip to content

Commit

Permalink
fix: improve sidebar ui
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcl-io committed Apr 30, 2021
1 parent 048585c commit 74c12b9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/components/NotifBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const useStyles = makeStyles((theme) => ({
container: {
backgroundColor: grey[800],
color: theme.palette.primary.contrastText,
padding: `${theme.spacing(2.5)}px ${theme.spacing(2)}px`,
padding: theme.spacing(2),
margin: `0 -${theme.spacing(2)}px`,
borderRadius: theme.shape.borderRadius,
},
}));
Expand Down
8 changes: 6 additions & 2 deletions src/components/SidebarComponents/FolderGroupTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const FolderGroupTitle = (props: Props) => {
const classes = useStyles();

return (
<List>
<List disablePadding>
<ListItem className={classes.listItem}>{props.title}</ListItem>
<ListItemSecondaryAction>
<DefaultIconButton
Expand All @@ -29,8 +29,12 @@ const FolderGroupTitle = (props: Props) => {

const useStyles = makeStyles((theme) => ({
listItem: {
fontSize: '0.9rem',
fontWeight: theme.typography.fontWeightMedium,
color: theme.palette.text.secondary,

'&.MuiListItem-gutters': {
padding: `${theme.spacing(0.8)}px ${theme.spacing(3)}px`,
padding: theme.spacing(2),
},
},
}));
Expand Down
3 changes: 1 addition & 2 deletions src/containers/Sidebar/Files/FilterFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const FilterFiles = (props: Props) => {

const useStyles = makeStyles((theme) => ({
formControl: {
marginTop: `-${theme.spacing(3)}px`,
marginBottom: `${theme.spacing(3)}px`,
marginTop: theme.spacing(2),
},
}));

Expand Down
2 changes: 1 addition & 1 deletion src/containers/Sidebar/Files/ListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const useStyles = makeStyles((theme) => ({
background: 'none !important',

'&.MuiListItem-gutters': {
padding: `0 ${theme.spacing(1)}px`,
padding: `0 ${theme.spacing(2)}px`,
},

'&.Mui-selected $listItemInner': {
Expand Down
4 changes: 1 addition & 3 deletions src/containers/Sidebar/Files/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,12 @@ const useStyles = makeStyles((theme) => ({
},

titleContainer: {
padding: `0 ${theme.spacing(3)}px`,
padding: theme.spacing(2),
},

title: {
display: 'flex',
justifyContent: 'space-between',
padding: `${theme.spacing(3)}px 0`,
marginBottom: theme.spacing(2),
},
}));

Expand Down
2 changes: 1 addition & 1 deletion src/containers/Sidebar/Folders/ListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const useStyles = makeStyles((theme) => ({
background: 'none !important',

'&.MuiListItem-gutters': {
padding: `0 ${theme.spacing(1)}px`,
padding: `0 ${theme.spacing(2)}px`,
},

'&.Mui-selected $listItemInner': {
Expand Down

0 comments on commit 74c12b9

Please sign in to comment.