Fix page header on mobile

This commit is contained in:
Krzysztof Bialoglowicz 2019-11-04 20:31:23 +01:00 committed by dominik-zeglen
parent 9911f2b278
commit 8e4a5b25f5
3 changed files with 22 additions and 4 deletions

View file

@ -30,7 +30,10 @@ const useStyles = makeStyles(theme => ({
cursor: "pointer", cursor: "pointer",
display: "flex", display: "flex",
marginTop: theme.spacing(0.5), marginTop: theme.spacing(0.5),
transition: theme.transitions.duration.standard + "ms" transition: theme.transitions.duration.standard + "ms",
[theme.breakpoints.down("sm")]: {
display: "none"
}
}, },
skeleton: { skeleton: {
marginBottom: theme.spacing(2), marginBottom: theme.spacing(2),
@ -40,9 +43,13 @@ const useStyles = makeStyles(theme => ({
color: "inherit", color: "inherit",
flex: 1, flex: 1,
marginLeft: theme.spacing(), marginLeft: theme.spacing(),
textTransform: "uppercase" textTransform: "uppercase",
[theme.breakpoints.down("sm")]: {
display: "none"
}
} }
})); }));
const AppHeader: React.FC<AppHeaderProps> = props => { const AppHeader: React.FC<AppHeaderProps> = props => {
const { children, onBack } = props; const { children, onBack } = props;

View file

@ -4,7 +4,10 @@ import React from "react";
const useStyles = makeStyles(theme => ({ const useStyles = makeStyles(theme => ({
action: { action: {
flex: "0 0 auto" flex: "0 0 auto",
[theme.breakpoints.down("sm")]: {
paddingLeft: 10
}
}, },
grid: { grid: {
padding: theme.spacing(2) padding: theme.spacing(2)
@ -18,7 +21,10 @@ const useStyles = makeStyles(theme => ({
root: { root: {
alignItems: "center", alignItems: "center",
display: "flex", display: "flex",
marginBottom: theme.spacing(3) marginBottom: theme.spacing(3),
[theme.breakpoints.down("sm")]: {
display: "block"
}
}, },
subtitle: { subtitle: {
alignItems: "center", alignItems: "center",

View file

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