Fix minor bugs

This commit is contained in:
dominik-zeglen 2019-11-12 17:28:21 +01:00
parent 1c9b9743e0
commit b2fa51ce94
7 changed files with 53 additions and 18 deletions

View file

@ -64,6 +64,12 @@ const useStyles = makeStyles(
marginLeft: theme.spacing(2), marginLeft: theme.spacing(2),
transition: theme.transitions.duration.standard + "ms" transition: theme.transitions.duration.standard + "ms"
}, },
avatar: {
"&&": {
height: 32,
width: 32
}
},
content: { content: {
[theme.breakpoints.down("sm")]: { [theme.breakpoints.down("sm")]: {
paddingLeft: 0 paddingLeft: 0
@ -79,9 +85,16 @@ const useStyles = makeStyles(
paddingLeft: drawerWidth paddingLeft: drawerWidth
}, },
darkThemeSwitch: { darkThemeSwitch: {
[theme.breakpoints.down("sm")]: {
marginRight: -theme.spacing(1.5)
},
marginRight: theme.spacing(2) marginRight: theme.spacing(2)
}, },
header: { header: {
[theme.breakpoints.down("sm")]: {
height: 88,
marginBottom: 0
},
display: "flex", display: "flex",
height: 40, height: 40,
marginBottom: theme.spacing(3) marginBottom: theme.spacing(3)
@ -179,6 +192,9 @@ const useStyles = makeStyles(
[theme.breakpoints.up("md")]: { [theme.breakpoints.up("md")]: {
display: "none" display: "none"
}, },
[theme.breakpoints.down("sm")]: {
left: 0
},
background: theme.palette.background.paper, background: theme.palette.background.paper,
borderRadius: "50%", borderRadius: "50%",
cursor: "pointer", cursor: "pointer",
@ -239,12 +255,20 @@ const useStyles = makeStyles(
flex: 1 flex: 1
}, },
userBar: { userBar: {
[theme.breakpoints.down("sm")]: {
alignItems: "flex-end",
flexDirection: "column-reverse",
overflow: "hidden"
},
alignItems: "center", alignItems: "center",
display: "flex" display: "flex"
}, },
userChip: { userChip: {
backgroundColor: theme.palette.background.paper, backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary borderRadius: 24,
color: theme.palette.text.primary,
height: 40,
padding: theme.spacing(0.5)
}, },
userMenuContainer: { userMenuContainer: {
position: "relative" position: "relative"
@ -415,6 +439,9 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
<Avatar alt="user" src={user.avatar.url} /> <Avatar alt="user" src={user.avatar.url} />
) )
} }
classes={{
avatar: classes.avatar
}}
className={classes.userChip} className={classes.userChip}
label={ label={
<> <>
@ -433,7 +460,6 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
open={isMenuOpened} open={isMenuOpened}
anchorEl={anchor.current} anchorEl={anchor.current}
transition transition
disablePortal
placement="bottom-end" placement="bottom-end"
> >
{({ TransitionProps, placement }) => ( {({ TransitionProps, placement }) => (

View file

@ -75,6 +75,7 @@ const useStyles = makeStyles(theme => ({
zIndex: 2 zIndex: 2
}, },
right: -300, right: -300,
width: drawerWidthExpanded,
zIndex: -1 zIndex: -1
}, },
subHeader: { subHeader: {

View file

@ -29,7 +29,7 @@ const useStyles = makeStyles(
popper: { popper: {
boxShadow: `0px 5px 10px 0 ${fade(theme.palette.common.black, 0.05)}`, boxShadow: `0px 5px 10px 0 ${fade(theme.palette.common.black, 0.05)}`,
marginTop: theme.spacing(2), marginTop: theme.spacing(2),
zIndex: 1 zIndex: 2
} }
}), }),
{ {

View file

@ -43,6 +43,9 @@ const useStyles = makeStyles(theme => ({
marginRight: theme.spacing(2) marginRight: theme.spacing(2)
}, },
content: { content: {
[theme.breakpoints.down("sm")]: {
gridTemplateColumns: "repeat(2, 1fr)"
},
display: "grid", display: "grid",
gridColumnGap: theme.spacing(3), gridColumnGap: theme.spacing(3),
gridTemplateColumns: "repeat(3, 1fr)", gridTemplateColumns: "repeat(3, 1fr)",

View file

@ -2,19 +2,24 @@ import { makeStyles } from "@material-ui/core/styles";
import classNames from "classnames"; import classNames from "classnames";
import React from "react"; import React from "react";
const useStyles = makeStyles(theme => ({ const useStyles = makeStyles(
root: { theme => ({
[theme.breakpoints.up("lg")]: { root: {
marginLeft: "auto", [theme.breakpoints.up("lg")]: {
marginRight: "auto", marginLeft: "auto",
maxWidth: theme.breakpoints.width("lg") marginRight: "auto",
}, maxWidth: theme.breakpoints.width("lg")
[theme.breakpoints.up("sm")]: { },
padding: theme.spacing(0, 3) [theme.breakpoints.up("sm")]: {
}, padding: theme.spacing(0, 3)
padding: theme.spacing(0, 1) },
padding: theme.spacing(0, 1)
}
}),
{
name: "Container"
} }
})); );
interface ContainerProps { interface ContainerProps {
className?: string; className?: string;

View file

@ -6,7 +6,7 @@ const useStyles = makeStyles(theme => ({
action: { action: {
flex: "0 0 auto", flex: "0 0 auto",
[theme.breakpoints.down("sm")]: { [theme.breakpoints.down("sm")]: {
paddingLeft: 10 marginTop: theme.spacing()
} }
}, },
grid: { grid: {

View file

@ -12,8 +12,8 @@ const useStyles = makeStyles(theme => ({
title: { title: {
[theme.breakpoints.down("sm")]: { [theme.breakpoints.down("sm")]: {
fontSize: 20, fontSize: 20,
paddingBottom: 20, marginTop: theme.spacing(2),
paddingLeft: 10 padding: 0
}, },
flex: 1, flex: 1,
fontSize: 24, fontSize: 24,