Skip to content

Commit 5d9ccd3

Browse files
committed
don't use deprecated theme spacing
1 parent 9da0888 commit 5d9ccd3

17 files changed

+60
-58
lines changed

interface/src/authentication/AuthenticationWrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import { withStyles } from '@material-ui/core/styles';
1111

1212
const styles = theme => ({
1313
loadingPanel: {
14-
padding: theme.spacing.unit * 2,
14+
padding: theme.spacing(2),
1515
display: "flex",
1616
alignItems: "center",
1717
justifyContent: "center",
1818
height: "100vh",
1919
flexDirection: "column"
2020
},
2121
progress: {
22-
margin: theme.spacing.unit * 4,
22+
margin: theme.spacing(4),
2323
}
2424
});
2525

interface/src/components/SectionContent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import Typography from '@material-ui/core/Typography';
77

88
const styles = theme => ({
99
content: {
10-
padding: theme.spacing.unit * 2,
11-
margin: theme.spacing.unit * 2,
10+
padding: theme.spacing(2),
11+
margin: theme.spacing(2),
1212
}
1313
});
1414

interface/src/components/SnackbarNotification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import CloseIcon from '@material-ui/icons/Close';
77

88
const styles = theme => ({
99
close: {
10-
padding: theme.spacing.unit / 2,
10+
padding: theme.spacing(0.5),
1111
},
1212
});
1313

interface/src/containers/APStatus.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ const styles = theme => ({
2828
backgroundColor: theme.palette.highlight_idle
2929
},
3030
fetching: {
31-
margin: theme.spacing.unit * 4,
31+
margin: theme.spacing(4),
3232
textAlign: "center"
3333
},
3434
button: {
35-
marginRight: theme.spacing.unit * 2,
36-
marginTop: theme.spacing.unit * 2,
35+
marginRight: theme.spacing(2),
36+
marginTop: theme.spacing(2),
3737
}
3838
});
3939

interface/src/containers/NTPStatus.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ const styles = theme => ({
3737
backgroundColor: theme.palette.highlight_warn
3838
},
3939
fetching: {
40-
margin: theme.spacing.unit * 4,
40+
margin: theme.spacing(4),
4141
textAlign: "center"
4242
},
4343
button: {
44-
marginRight: theme.spacing.unit * 2,
45-
marginTop: theme.spacing.unit * 2,
44+
marginRight: theme.spacing(2),
45+
marginTop: theme.spacing(2),
4646
}
4747
});
4848

interface/src/containers/SignInPage.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,30 @@ const styles = theme => {
1717
display: "flex",
1818
height: "100vh",
1919
margin: "auto",
20-
padding: theme.spacing.unit * 2,
20+
padding: theme.spacing(2),
2121
justifyContent: "center",
2222
flexDirection: "column",
2323
maxWidth: theme.breakpoints.values.sm
2424
},
2525
loginPanel: {
2626
textAlign: "center",
27-
padding: theme.spacing.unit * 2,
27+
padding: theme.spacing(2),
2828
paddingTop: "200px",
2929
backgroundImage: 'url("/app/icon.png")',
3030
backgroundRepeat: "no-repeat",
31-
backgroundPosition: "50% " + theme.spacing.unit * 2 + "px",
31+
backgroundPosition: "50% " + theme.spacing(2) + "px",
3232
backgroundSize: "auto 150px",
3333
width: "100%"
3434
},
3535
extendedIcon: {
36-
marginRight: theme.spacing.unit,
36+
marginRight: theme.spacing(0.5),
3737
},
3838
textField: {
3939
width: "100%"
4040
},
4141
button: {
42-
marginRight: theme.spacing.unit * 2,
43-
marginTop: theme.spacing.unit * 2,
42+
marginRight: theme.spacing(2),
43+
marginTop: theme.spacing(2),
4444
}
4545
}
4646
}

interface/src/containers/SystemStatus.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import SectionContent from '../components/SectionContent';
2323

2424
const styles = theme => ({
2525
fetching: {
26-
margin: theme.spacing.unit * 4,
26+
margin: theme.spacing(4),
2727
textAlign: "center"
2828
},
2929
button: {
30-
marginRight: theme.spacing.unit * 2,
31-
marginTop: theme.spacing.unit * 2,
30+
marginRight: theme.spacing(2),
31+
marginTop: theme.spacing(2),
3232
}
3333
});
3434

interface/src/containers/WiFiStatus.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ const styles = theme => ({
3838
backgroundColor: theme.palette.highlight_warn
3939
},
4040
fetching: {
41-
margin: theme.spacing.unit * 4,
41+
margin: theme.spacing(4),
4242
textAlign: "center"
4343
},
4444
button: {
45-
marginRight: theme.spacing.unit * 2,
46-
marginTop: theme.spacing.unit * 2,
45+
marginRight: theme.spacing(2),
46+
marginTop: theme.spacing(2),
4747
}
4848
});
4949

interface/src/forms/APSettingsForm.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ import PasswordValidator from '../components/PasswordValidator';
1414

1515
const styles = theme => ({
1616
loadingSettings: {
17-
margin: theme.spacing.unit,
17+
margin: theme.spacing(0.5),
1818
},
1919
loadingSettingsDetails: {
20-
margin: theme.spacing.unit * 4,
20+
margin: theme.spacing(4),
2121
textAlign: "center"
2222
},
2323
textField: {
2424
width: "100%"
2525
},
2626
selectField:{
2727
width: "100%",
28-
marginTop: theme.spacing.unit * 2,
29-
marginBottom: theme.spacing.unit
28+
marginTop: theme.spacing(2),
29+
marginBottom: theme.spacing(0.5)
3030
},
3131
button: {
32-
marginRight: theme.spacing.unit * 2,
33-
marginTop: theme.spacing.unit * 2,
32+
marginRight: theme.spacing(2),
33+
marginTop: theme.spacing(2),
3434
}
3535
});
3636

interface/src/forms/ManageUsersForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ import { withAuthenticationContext } from '../authentication/Context';
2626

2727
const styles = theme => ({
2828
loadingSettings: {
29-
margin: theme.spacing.unit,
29+
margin: theme.spacing(0.5),
3030
},
3131
loadingSettingsDetails: {
32-
margin: theme.spacing.unit * 4,
32+
margin: theme.spacing(4),
3333
textAlign: "center"
3434
},
3535
button: {
36-
marginRight: theme.spacing.unit * 2,
37-
marginTop: theme.spacing.unit * 2,
36+
marginRight: theme.spacing(2),
37+
marginTop: theme.spacing(2),
3838
},
3939
table: {
40-
'& td, & th': { padding: theme.spacing.unit }
40+
'& td, & th': { padding: theme.spacing(0.5) }
4141
},
4242
actions: {
4343
whiteSpace: "nowrap"

0 commit comments

Comments
 (0)