@@ -12,7 +12,9 @@ import {
1212 ListItemText ,
1313 makeStyles ,
1414 TextField ,
15- Typography
15+ Typography ,
16+ useTheme ,
17+ useMediaQuery
1618} from "@material-ui/core" ;
1719import { useState } from "react" ;
1820import { useDispatch , useSelector } from "react-redux" ;
@@ -57,6 +59,10 @@ const useStyles = makeStyles(theme => ({
5759 marginRight : theme . spacing ( 2 ) ,
5860 marginTop : theme . spacing ( 2 )
5961 } ,
62+ smallPadding : {
63+ paddingLeft : theme . spacing ( 1 ) ,
64+ paddingRight : theme . spacing ( 1 )
65+ } ,
6066 red : redStyle ( theme ) ,
6167 redBg : redBgStyle ( theme )
6268} ) ) ;
@@ -67,6 +73,9 @@ function SettingsDialog(props: Props) {
6773 const settings = rootState . settings ;
6874 const dispatch = useDispatch ( ) ;
6975
76+ const theme = useTheme ( ) ;
77+ const isSmallDevice = useMediaQuery ( theme . breakpoints . down ( "xs" ) ) ;
78+
7079 // Local states
7180 const [ maxPriorities , setMaxPriorities ] = useState ( rootState . settings . maxPriorities . toString ( ) ) ;
7281 const [ errorPriorities , setErrorPriorities ] = useState ( false ) ;
@@ -163,7 +172,7 @@ function SettingsDialog(props: Props) {
163172 fullWidth
164173 >
165174 < DialogTitle className = { classes . title } > Settings</ DialogTitle >
166- < DialogContent >
175+ < DialogContent className = { isSmallDevice ? classes . smallPadding : "" } >
167176 < ConfirmationDialog
168177 open = { confirmationDialog }
169178 text = { confirmationText }
0 commit comments